mirror of
https://github.com/nodejs/node.git
synced 2025-12-28 07:50:41 +00:00
PR-URL: https://github.com/nodejs/node/pull/60891 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
11 lines
368 B
JavaScript
11 lines
368 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());
|