node/test/es-module/test-esm-loader-event-loop.mjs
Geoffrey Booth 9e840deecc
esm: misc test refactors
- 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>
2023-02-18 14:26:36 +00:00

13 lines
361 B
JavaScript

// Flags: --experimental-loader ./test/fixtures/es-module-loaders/hooks-custom.mjs
import { mustCall } from '../common/index.mjs';
const done = mustCall();
// Test that the process doesn't exit because of a caught exception thrown as part of dynamic import().
for (let i = 0; i < 10; i++) {
await import('nonexistent/file.mjs').catch(() => {});
}
done();