node/test/module-hooks/test-async-loader-hooks-use-hooks-require-esm.mjs
Geoffrey Booth 0dfdec9542
module: runtime-deprecate module.register()
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>
2026-04-01 15:37:26 +02:00

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,
},
);