Skip to content

Commit

Permalink
esm: fix duplicated test
Browse files Browse the repository at this point in the history
PR-URL: #44779
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
GeoffreyBooth authored and juanarbol committed Oct 11, 2022
1 parent 006d7f1 commit 7cead59
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 23 deletions.
21 changes: 0 additions & 21 deletions test/es-module/test-esm-specifiers-legacy-flag.mjs

This file was deleted.

7 changes: 5 additions & 2 deletions test/es-module/test-esm-specifiers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ describe('ESM: specifier-resolution=node', { concurrency: true }, () => {
'--eval',
[
'import { strictEqual } from "node:assert";',
// commonJS index.js
// CommonJS index.js
`import commonjs from ${JSON.stringify(fixtures.fileURL('es-module-specifiers/package-type-commonjs'))};`,
// esm index.js
// ESM index.js
`import module from ${JSON.stringify(fixtures.fileURL('es-module-specifiers/package-type-module'))};`,
// Directory entry with main.js
`import main from ${JSON.stringify(fixtures.fileURL('es-module-specifiers/dir-with-main'))};`,
// Notice the trailing slash
`import success, { explicit, implicit, implicitModule } from ${JSON.stringify(fixtures.fileURL('es-module-specifiers/'))};`,
'strictEqual(commonjs, "commonjs");',
'strictEqual(module, "module");',
'strictEqual(main, "main");',
'strictEqual(success, "success");',
'strictEqual(explicit, "esm");',
'strictEqual(implicit, "cjs");',
Expand Down

0 comments on commit 7cead59

Please sign in to comment.