Skip to content

Commit

Permalink
fixup! esm: bypass CJS loader in default load under `--default-type=m…
Browse files Browse the repository at this point in the history
…odule`
  • Loading branch information
aduh95 committed Oct 23, 2023
1 parent fadff3b commit 197863a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/es-module/test-esm-type-flag-errors.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ describe('--experimental-default-type=module', { concurrency: true }, () => {
});
});

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

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

Expand Down

0 comments on commit 197863a

Please sign in to comment.