mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
2551a21553
PR-URL: https://github.com/nodejs/node/pull/30986 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
11 lines
367 B
JavaScript
11 lines
367 B
JavaScript
// Flags: --experimental-loader ./test/fixtures/es-module-loaders/loader-invalid-format.mjs
|
|
import { expectsError, mustCall } from '../common/index.mjs';
|
|
import assert from 'assert';
|
|
|
|
import('../fixtures/es-modules/test-esm-ok.mjs')
|
|
.then(assert.fail, expectsError({
|
|
code: 'ERR_UNKNOWN_MODULE_FORMAT',
|
|
message: /Unknown module format: esm/
|
|
}))
|
|
.then(mustCall());
|