node/test/es-module/test-esm-pkgname.mjs
Antoine du Hamel ecc62381a8
test: refactor some esm tests
PR-URL: https://github.com/nodejs/node/pull/55472
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-11-05 23:40:39 +00:00

14 lines
304 B
JavaScript

import '../common/index.mjs';
import assert from 'node:assert';
import { importFixture } from '../fixtures/pkgexports.mjs';
await Promise.all([
'as%2Ff',
'as%5Cf',
'as\\df',
'@as@df',
].map((specifier) => assert.rejects(importFixture(specifier), {
code: 'ERR_INVALID_MODULE_SPECIFIER',
})));