node/test/fixtures/module-hooks
Joyee Cheung e75617d25f
test: split test-esm-loader-hooks
Previously whenever one of the test case fails in the CI, it
barely logged anything useful in the CI and it was difficult to
nail down the specific failing case with a local reproduction,
especially when the test fixutre is inline JavaScript. This patch:

- Puts all the inline JavaScript in on-disk fixtures so that
  they can be re-run easily.
- Split the tests into individual files so that it's easier to nail
  down the failure
- Use spawnSyncAndAssert which logs useful information when the child
  process does not behave as expected.
- Rename the tests as module-hooks/test-async-loader-hooks-* because
  they belong to the module hooks test suite and are not esm-specific.

PR-URL: https://github.com/nodejs/node/pull/61374
Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-01-13.md
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-01-27 22:52:26 +01:00
..
node_modules
require-esm esm: use sync loading/resolving on non-loader-hook thread 2025-11-13 22:44:15 +01:00
sync-and-async
add-hook.js
create-require-with-url.mjs module: preserve URL in the parent created by createRequire() 2026-01-19 19:19:23 +01:00
empty.mjs module: preserve URL in the parent created by createRequire() 2026-01-19 19:19:23 +01:00
get-stats.js
load-from-this-dir.js
log-user.cts
log-user.mts
logger-async-hooks.mjs esm: use sync loading/resolving on non-loader-hook thread 2025-11-13 22:44:15 +01:00
redirected-assert.js
redirected-fs.js
redirected-zlib.js
redirected-zlib.mjs module: fix sync resolve hooks for require with node: prefixes 2026-01-19 19:19:27 +01:00
register-loader-in-sequence.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
register-loader-initialize-never-settling.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
register-loader-with-cjs.cjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
register-loader-with-ports.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
register-logger-async-hooks.mjs esm: use sync loading/resolving on non-loader-hook thread 2025-11-13 22:44:15 +01:00
register-typescript-hooks.js
typescript-transpiler.js
user.ts