0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 15:30:56 +01:00
nodejs/test/es-module/test-esm-loader-invalid-url.mjs
Jacob Smith d859e9e997
esm: add chaining to loaders
PR-URL: https://github.com/nodejs/node/pull/42623
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-04 16:51:12 +01:00

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());