revert UnnecessaryBlockTest.java
This commit is contained in:
parent
8350de911a
commit
b01d630e2e
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user