Skip to content

Commit d7e7422

Browse files
committed
actually run test
1 parent d707724 commit d7e7422

File tree

2 files changed

+27
-5
lines changed

2 files changed

+27
-5
lines changed

e2e/__tests__/__snapshots__/nativeEsm.test.ts.snap

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exports[`does not enforce import assertions 1`] = `
55
Tests: 2 passed, 2 total
66
Snapshots: 0 total
77
Time: <<REPLACED>>
8-
Ran all test suites matching /native-esm-missing-import-assertions.test/i."
8+
Ran all test suites matching /native-esm-missing-import-assertions.test.js/i."
99
`;
1010
1111
exports[`on node >=16.9.0 support re-exports from CJS of dual packages 1`] = `
@@ -21,7 +21,15 @@ exports[`on node >=16.12.0 supports import assertions 1`] = `
2121
Tests: 2 passed, 2 total
2222
Snapshots: 0 total
2323
Time: <<REPLACED>>
24-
Ran all test suites matching /native-esm-import-assertions.test/i."
24+
Ran all test suites matching /native-esm-import-assertions.test.js/i."
25+
`;
26+
27+
exports[`properly handle re-exported native modules in ESM via CJS 1`] = `
28+
"Test Suites: 1 passed, 1 total
29+
Tests: 1 passed, 1 total
30+
Snapshots: 0 total
31+
Time: <<REPLACED>>
32+
Ran all test suites matching /native-esm-native-module.test.js/i."
2533
`;
2634
2735
exports[`runs WebAssembly (Wasm) test with native ESM 1`] = `

e2e/__tests__/nativeEsm.test.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,21 @@ test('runs WebAssembly (Wasm) test with native ESM', () => {
9797
test('does not enforce import assertions', () => {
9898
const {exitCode, stderr, stdout} = runJest(
9999
DIR,
100-
['native-esm-missing-import-assertions.test'],
100+
['native-esm-missing-import-assertions.test.js'],
101+
{nodeOptions: '--experimental-vm-modules --no-warnings'},
102+
);
103+
104+
const {summary} = extractSummary(stderr);
105+
106+
expect(summary).toMatchSnapshot();
107+
expect(stdout).toBe('');
108+
expect(exitCode).toBe(0);
109+
});
110+
111+
test('properly handle re-exported native modules in ESM via CJS', () => {
112+
const {exitCode, stderr, stdout} = runJest(
113+
DIR,
114+
['native-esm-native-module.test.js'],
101115
{nodeOptions: '--experimental-vm-modules --no-warnings'},
102116
);
103117

@@ -113,7 +127,7 @@ onNodeVersions('>=16.12.0', () => {
113127
test('supports import assertions', () => {
114128
const {exitCode, stderr, stdout} = runJest(
115129
DIR,
116-
['native-esm-import-assertions.test'],
130+
['native-esm-import-assertions.test.js'],
117131
{nodeOptions: '--experimental-vm-modules --no-warnings'},
118132
);
119133

@@ -129,7 +143,7 @@ onNodeVersions('<16.12.0', () => {
129143
test('syntax error for import assertions', () => {
130144
const {exitCode, stderr, stdout} = runJest(
131145
DIR,
132-
['native-esm-import-assertions.test'],
146+
['native-esm-import-assertions.test.js'],
133147
{nodeOptions: '--experimental-vm-modules --no-warnings'},
134148
);
135149

0 commit comments

Comments
 (0)