mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
d859e9e997
PR-URL: https://github.com/nodejs/node/pull/42623 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
11 lines
412 B
JavaScript
11 lines
412 B
JavaScript
// Flags: --experimental-loader ./test/fixtures/es-module-loaders/loader-invalid-url.mjs
|
|
import { expectsError, mustCall } from '../common/index.mjs';
|
|
import assert from 'assert';
|
|
|
|
import('../fixtures/es-modules/test-esm-ok.mjs')
|
|
.then(assert.fail, (error) => {
|
|
expectsError({ code: 'ERR_INVALID_RETURN_PROPERTY_VALUE' })(error);
|
|
assert.match(error.message, /loader-invalid-url\.mjs/);
|
|
})
|
|
.then(mustCall());
|