Skip to content

Commit

Permalink
test: assert extension resolution order in node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed Jun 27, 2024
1 parent fc41979 commit bcf96c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,9 @@ export const files = {
'pkg-commonjs': {
'package.json': createPackageJson({
type: 'commonjs',
main: './index.js',
}),
'index.ts': 'throw new Error("should prefer .js over .ts in node_modules")',
'index.js': syntaxLowering,
'ts.ts': syntaxLowering,
'cjs.js': `
Expand All @@ -282,6 +284,7 @@ export const files = {
'#*': './*',
},
}),
'index.ts': 'throw new Error("should prefer .js over .ts in node_modules")',
'index.js': `${syntaxLowering}\nexport * from "./empty-export"`,
'empty-export/index.js': 'export {}',
'ts.ts': `${syntaxLowering}\nexport * from "#empty.js"`,
Expand Down

0 comments on commit bcf96c7

Please sign in to comment.