PR-URL: https://github.com/nodejs/node/pull/62401 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me>
21 lines
557 B
JavaScript
21 lines
557 B
JavaScript
// Test that loader should use hooks for require of ESM
|
|
import '../common/index.mjs';
|
|
import { execPath } from 'node:process';
|
|
import fixtures from '../common/fixtures.js';
|
|
import { spawnSyncAndAssert } from '../common/child_process.js';
|
|
|
|
spawnSyncAndAssert(
|
|
execPath,
|
|
[
|
|
'--no-deprecation',
|
|
'--no-experimental-require-module',
|
|
'--import',
|
|
fixtures.fileURL('es-module-loaders/builtin-named-exports.mjs'),
|
|
fixtures.path('es-modules/require-esm-throws-with-loaders.js'),
|
|
],
|
|
{
|
|
stdout: '',
|
|
stderr: '',
|
|
trim: true,
|
|
},
|
|
);
|