Skip to content

Commit

Permalink
Exclude test if parser doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
jportner committed Jan 23, 2023
1 parent abf7bc5 commit 51619a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/src/rules/no-duplicates.js
Expand Up @@ -131,7 +131,7 @@ ruleTester.run('no-duplicates', rule, {
}),

// These test cases use duplicate import identifiers, which causes a fatal parsing error using ESPREE (default) and TS_OLD.
...[parsers.BABEL_OLD, parsers.TS_NEW].flatMap((parser => [
...[parsers.BABEL_OLD, parsers.TS_NEW].flatMap((parser => !parser ? [] : [
// #2347: duplicate identifiers should be removed
test({
code: "import {a} from './foo'; import { a } from './foo'",
Expand Down

0 comments on commit 51619a6

Please sign in to comment.