Skip to content

Commit 6be042b

Browse files
committed
[Tests] no-extraneous-dependencies: add passing test
Closes #2718
1 parent 6f12316 commit 6be042b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/src/rules/no-extraneous-dependencies.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,5 +475,14 @@ typescriptRuleTester.run('no-extraneous-dependencies typescript type imports', r
475475
message: `'not-a-dependency' should be listed in the project's dependencies. Run 'npm i -S not-a-dependency' to add it`,
476476
}],
477477
}),
478+
test({
479+
code: `import type { Foo } from 'not-a-dependency'`,
480+
options: [{ includeTypes: true }],
481+
filename: testFilePath('./no-unused-modules/typescript/file-ts-a.ts'),
482+
parser: parsers.BABEL_OLD,
483+
errors: [{
484+
message: `'not-a-dependency' should be listed in the project's dependencies. Run 'npm i -S not-a-dependency' to add it`,
485+
}],
486+
}),
478487
],
479488
});

0 commit comments

Comments
 (0)