Skip to content

Commit

Permalink
Update test/es-module/test-esm-loader.mjs
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine du Hamel <[email protected]>
  • Loading branch information
bmacnaughton and aduh95 authored Nov 30, 2023
1 parent 91f780c commit 934406a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions test/es-module/test-esm-loader.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,10 @@ await assert.rejects(
{ code: 'ERR_INVALID_RETURN_PROPERTY_VALUE' },
);

try {
await import('esmHook/commonJsNullSource.mjs');
} catch ({ code, message }) {
assert.strictEqual(code, 'ERR_INVALID_RETURN_PROPERTY_VALUE');
assert.match(message, /"source"/);
assert.match(message, /'load'/);
assert.match(message, /got type bigint/);
}
await assert.rejects(import('esmHook/commonJsNullSource.mjs'), {
code: 'ERR_INVALID_RETURN_PROPERTY_VALUE',
message: /"source".*'load'.*got type bigint/,
});

await import('../fixtures/es-module-loaders/js-as-esm.js')
.then((parsedModule) => {
Expand Down

0 comments on commit 934406a

Please sign in to comment.