Skip to content

Commit

Permalink
Add default import case
Browse files Browse the repository at this point in the history
  • Loading branch information
CoryDanielson authored Sep 16, 2024
1 parent 705474f commit d43a337
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('dependencyExtractor', () => {
);
});

it('should not extract dependencies from `import type/typeof` statements', () => {
it('should not extract dependencies from `import type/typeof` statements, or type-only imports', () => {
const code = `
// Bad
import typeof {foo} from 'inv1';
Expand All @@ -108,8 +108,9 @@ describe('dependencyExtractor', () => {
type foo,
bar
} from 'inv8';
import TheDefaultExport, {type foo, type bar} from 'inv9';
`;
expect(extractor.extract(code)).toEqual(new Set(['inv5', 'inv6', 'inv7', 'inv8']));
expect(extractor.extract(code)).toEqual(new Set(['inv5', 'inv6', 'inv7', 'inv8', 'inv9']));

Check failure on line 113 in packages/jest-haste-map/src/lib/__tests__/dependencyExtractor.test.js

View workflow job for this annotation

GitHub Actions / Lint

Replace `new·Set(['inv5',·'inv6',·'inv7',·'inv8',·'inv9'])` with `⏎······new·Set(['inv5',·'inv6',·'inv7',·'inv8',·'inv9']),⏎····`
});

it('should extract dependencies from `export` statements', () => {
Expand Down

0 comments on commit d43a337

Please sign in to comment.