Skip to content

Commit 197863a

Browse files
committed
fixup! esm: bypass CJS loader in default load under --default-type=module
1 parent fadff3b commit 197863a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/es-module/test-esm-type-flag-errors.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ describe('--experimental-default-type=module', { concurrency: true }, () => {
5959
});
6060
});
6161

62-
it('should not affect entry point .cjs files (with no hooks)', async () => {
62+
it('should affect entry point .cjs files (with no hooks)', async () => {
6363
const { stderr, stdout, code } = await spawnPromisified(process.execPath, [
6464
'--experimental-default-type=module',
6565
fixtures.path('es-module-require-cache/echo.cjs'),
6666
]);
6767

6868
strictEqual(stderr, '');
69-
match(stdout, /^\[Object: null prototype\] \{(\n .+)+\n\}\n$/);
69+
match(stdout, /^undefined\n$/);
7070
strictEqual(code, 0);
7171
});
7272

0 commit comments

Comments
 (0)