Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 51619a6

Browse files
committedJan 23, 2023
Exclude test if parser doesn't exist
1 parent abf7bc5 commit 51619a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎tests/src/rules/no-duplicates.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ ruleTester.run('no-duplicates', rule, {
131131
}),
132132

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

0 commit comments

Comments
 (0)
Please sign in to comment.