Skip to content

Commit 5a51b9a

Browse files
G-Rathljharb
authored andcommitted
[Tests] rule-tester: try this babel class workaround
1 parent d66cde0 commit 5a51b9a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/src/rule-tester.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ export function withoutAutofixOutput(test) {
88
return { ...test, ...usingFlatConfig || { output: test.code } };
99
}
1010

11-
class FlatCompatRuleTester extends RuleTester {
11+
class FlatCompatRuleTester {
1212
constructor(testerConfig = { parserOptions: { sourceType: 'script' } }) {
13-
super(FlatCompatRuleTester._flatCompat(testerConfig));
13+
this._tester = new RuleTester(FlatCompatRuleTester._flatCompat(testerConfig));
1414
}
1515

1616
run(ruleName, rule, tests) {
17-
super.run(ruleName, rule, {
17+
this._tester.run(ruleName, rule, {
1818
valid: tests.valid.map((t) => FlatCompatRuleTester._flatCompat(t)),
1919
invalid: tests.invalid.map((t) => FlatCompatRuleTester._flatCompat(t)),
2020
});

0 commit comments

Comments
 (0)