-
-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
71cc82b
commit 325eba7
Showing
13 changed files
with
167 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
packages/commonjs/test/fixtures/function/import-esm-require-returns-default-auto/main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
const externalNamed = require('external-esm-named'); | ||
const externalMixed = require('external-esm-mixed'); | ||
const externalDefault = require('external-esm-default'); | ||
|
||
const namedExports = require('./named.js'); | ||
const mixedExports = require('./mixed.js'); | ||
const defaultExport = require('./default.js'); | ||
const noExports = require('./none.js'); | ||
|
||
t.deepEqual(namedExports, { foo: 'foo' }, 'named exports'); | ||
t.deepEqual(mixedExports, { foo: 'foo', default: 'bar' }, 'mixed exports'); | ||
t.deepEqual(defaultExport, 'bar', 'default export'); | ||
t.deepEqual(noExports, {}, 'no exports'); | ||
t.deepEqual(externalNamed, { foo: 'foo' }, 'external named'); | ||
t.deepEqual(externalMixed, { foo: 'foo', default: 'bar' }, 'external mixed'); | ||
t.deepEqual(externalDefault, 'bar', 'external default'); |
Empty file.
3 changes: 3 additions & 0 deletions
3
packages/commonjs/test/fixtures/function/import-esm-require-returns-default-false/main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
const externalNamed = require('external-esm-named'); | ||
const externalMixed = require('external-esm-mixed'); | ||
const externalDefault = require('external-esm-default'); | ||
|
||
const namedExports = require('./named.js'); | ||
const mixedExports = require('./mixed.js'); | ||
const defaultExport = require('./default.js'); | ||
const noExports = require('./none.js'); | ||
|
||
t.deepEqual(namedExports, { foo: 'foo' }, 'named exports'); | ||
t.deepEqual(mixedExports, { foo: 'foo', default: 'bar' }, 'mixed exports'); | ||
t.deepEqual(defaultExport, { default: 'bar' }, 'default export'); | ||
t.deepEqual(noExports, {}, 'no exports'); | ||
t.deepEqual(externalNamed, { foo: 'foo' }, 'external named'); | ||
t.deepEqual(externalMixed, { foo: 'foo', default: 'bar' }, 'external mixed'); | ||
t.deepEqual(externalDefault, { default: 'bar' }, 'external default'); |
Empty file.
1 change: 0 additions & 1 deletion
1
...urns-default-external-function/_config.js β ...urns-default-function-external/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
...ages/commonjs/test/fixtures/function/import-esm-require-returns-default-preferred/main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
const externalNamed = require('external-esm-named'); | ||
const externalMixed = require('external-esm-mixed'); | ||
const externalDefault = require('external-esm-default'); | ||
|
||
const namedExports = require('./named.js'); | ||
const mixedExports = require('./mixed.js'); | ||
const defaultExport = require('./default.js'); | ||
const noExports = require('./none.js'); | ||
|
||
t.deepEqual(namedExports, { foo: 'foo' }, 'named exports'); | ||
t.deepEqual(mixedExports, 'bar', 'mixed exports'); | ||
t.deepEqual(defaultExport, 'bar', 'default export'); | ||
t.deepEqual(noExports, {}, 'no exports'); | ||
t.deepEqual(externalNamed, { foo: 'foo' }, 'external named'); | ||
t.deepEqual(externalMixed, 'bar', 'external mixed'); | ||
t.deepEqual(externalDefault, 'bar', 'external default'); |
Empty file.
3 changes: 3 additions & 0 deletions
3
...ages/commonjs/test/fixtures/function/import-esm-require-returns-default-undefined/main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
const externalNamed = require('external-esm-named'); | ||
const externalMixed = require('external-esm-mixed'); | ||
const externalDefault = require('external-esm-default'); | ||
|
||
const namedExports = require('./named.js'); | ||
const mixedExports = require('./mixed.js'); | ||
const defaultExport = require('./default.js'); | ||
const noExports = require('./none.js'); | ||
|
||
t.deepEqual(namedExports, { foo: 'foo' }, 'named exports'); | ||
t.deepEqual(mixedExports, { foo: 'foo', default: 'bar' }, 'mixed exports'); | ||
t.deepEqual(defaultExport, { default: 'bar' }, 'default export'); | ||
t.deepEqual(noExports, {}, 'no exports'); | ||
t.deepEqual(externalNamed, { foo: 'foo' }, 'external named'); | ||
t.deepEqual(externalMixed, { foo: 'foo', default: 'bar' }, 'external mixed'); | ||
t.deepEqual(externalDefault, { default: 'bar' }, 'external default'); |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.