From 6be042b559aecc50f3a5313f20023a2cc4879541 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 7 Apr 2023 22:22:40 -0700 Subject: [PATCH] [Tests] `no-extraneous-dependencies`: add passing test Closes #2718 --- tests/src/rules/no-extraneous-dependencies.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/src/rules/no-extraneous-dependencies.js b/tests/src/rules/no-extraneous-dependencies.js index c1018a914..8815f63cd 100644 --- a/tests/src/rules/no-extraneous-dependencies.js +++ b/tests/src/rules/no-extraneous-dependencies.js @@ -475,5 +475,14 @@ typescriptRuleTester.run('no-extraneous-dependencies typescript type imports', r message: `'not-a-dependency' should be listed in the project's dependencies. Run 'npm i -S not-a-dependency' to add it`, }], }), + test({ + code: `import type { Foo } from 'not-a-dependency'`, + options: [{ includeTypes: true }], + filename: testFilePath('./no-unused-modules/typescript/file-ts-a.ts'), + parser: parsers.BABEL_OLD, + errors: [{ + message: `'not-a-dependency' should be listed in the project's dependencies. Run 'npm i -S not-a-dependency' to add it`, + }], + }), ], });