Skip to content

Commit

Permalink
[Tests] no-extraneous-dependencies: add passing test
Browse files Browse the repository at this point in the history
Closes #2718
  • Loading branch information
ljharb committed Apr 8, 2023
1 parent 6f12316 commit 6be042b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/src/rules/no-extraneous-dependencies.js
Expand Up @@ -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`,
}],
}),
],
});

0 comments on commit 6be042b

Please sign in to comment.