revert UnnecessaryBlockTest.java

This commit is contained in:
Sashko 2024-02-22 01:48:03 +02:00 committed by GitHub
parent 8350de911a
commit b01d630e2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,30 +3,5 @@ package net.sourceforge.pmd.lang.ecmascript.rule.codestyle;
import net.sourceforge.pmd.testframework.PmdRuleTst;
public class UnnecessaryBlockTest extends PmdRuleTst {
@Override
public void setUp() {
// Set up any required configurations or resources before running the tests
}
public void testUnnecessaryBlockInImportStatement() {
String code = "import { foo } from 'bar';\n" +
"{\n" +
" // Unnecessary block\n" +
"}\n";
// Assert that the PMD rule does not flag the unnecessary block within import statement
addSourceCodeTest(code, 0);
}
public void testUnnecessaryBlockInDestructuringAssignment() {
String code = "const { a, b } = obj;\n" +
"{\n" +
" // Unnecessary block\n" +
"}\n";
// Assert that the PMD rule does not flag the unnecessary block within destructuring assignment
addSourceCodeTest(code, 0);
}
}