Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! esm: bypass CJS loader in default load under `--default-type=m…
…odule`
  • Loading branch information
aduh95 committed Oct 23, 2023
commit 197863a27202bac91dcebeb3ace722a9737c3a03
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