• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Flags: --es-module-specifier-resolution=node
2import '../common/index.mjs';
3import assert from 'assert';
4
5// commonJS index.js
6import commonjs from '../fixtures/es-module-specifiers/package-type-commonjs';
7// esm index.js
8import module from '../fixtures/es-module-specifiers/package-type-module';
9// Directory entry with main.js
10import main from '../fixtures/es-module-specifiers/dir-with-main';
11// Notice the trailing slash
12import success, { explicit, implicit, implicitModule }
13  from '../fixtures/es-module-specifiers/';
14
15assert.strictEqual(commonjs, 'commonjs');
16assert.strictEqual(module, 'module');
17assert.strictEqual(main, 'main');
18assert.strictEqual(success, 'success');
19assert.strictEqual(explicit, 'esm');
20assert.strictEqual(implicit, 'cjs');
21assert.strictEqual(implicitModule, 'cjs');
22