Skip to content

Commit

Permalink
use base URL in test
Browse files Browse the repository at this point in the history
  • Loading branch information
fasttime committed Nov 8, 2023
1 parent 5233238 commit 4dcbec5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/es-module/test-esm-loader-with-source.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as fixtures from '../common/fixtures.mjs';
import assert from 'assert';

const { default: existingFileSource } = await import(fixtures.fileURL('es-modules', 'cjs-file.cjs'));
const { default: noSuchFileSource } = await import('file:///no-such-file.cjs');
const { default: noSuchFileSource } = await import(new URL('./no-such-file.cjs', import.meta.url));

assert.strictEqual(existingFileSource, 'no .cjs file was read to get this source');
assert.strictEqual(noSuchFileSource, 'no .cjs file was read to get this source');

0 comments on commit 4dcbec5

Please sign in to comment.