blob: af3b939bcf8c0eb5e02de80ca3c18b60b4a2b18d [file] [edit]
// Test that it should be fine to call `process.exit` from a custom async hook
import '../common/index.mjs';
import { execPath } from 'node:process';
import fixtures from '../common/fixtures.js';
import { spawnSyncAndExit } from '../common/child_process.js';
spawnSyncAndExit(
execPath,
[
'--no-warnings',
'--experimental-loader',
fixtures.fileURL('es-module-loaders/loader-exit-on-load.mjs'),
'--input-type=module',
'--eval',
'import "data:exit"',
],
{
status: 42,
signal: null,
stdout: '',
stderr: '',
trim: true,
},
);