mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
9e840deecc
- add test specific to the event loop - move parallel tests into es-module folder - refactor fixture to add braces for if blocks - use 'os' instead of 'fs' as placeholder - spelling PR-URL: https://github.com/nodejs/node/pull/46631 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
13 lines
439 B
JavaScript
13 lines
439 B
JavaScript
// Flags: --experimental-loader ./test/fixtures/es-module-loaders/loader-unknown-builtin-module.mjs
|
|
import { expectsError, mustCall } from '../common/index.mjs';
|
|
import assert from 'assert';
|
|
|
|
const unknownBuiltinModule = 'node:unknown-builtin-module';
|
|
|
|
import(unknownBuiltinModule)
|
|
.then(assert.fail, expectsError({
|
|
code: 'ERR_UNKNOWN_BUILTIN_MODULE',
|
|
message: `No such built-in module: ${unknownBuiltinModule}`
|
|
}))
|
|
.then(mustCall());
|