node/test/fixtures/es-module-loaders
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
..
never-settling-resolve-step esm: use sync loading/resolving on non-loader-hook thread 2025-11-13 22:44:15 +01:00
node_modules
assertionless-json-import.mjs
builtin-named-exports-loader.mjs module: unflag detect-module 2024-07-20 18:30:46 +00:00
builtin-named-exports.mjs Revert "module: have a single hooks thread for all workers" 2024-06-02 22:10:34 +00:00
byop-dummy-loader.mjs
example-loader.mjs
hook-resolve-type-loader.mjs
hook-resolve-type.mjs
hooks-custom.mjs module: prevent main thread exiting before esm worker ends 2024-12-10 23:52:29 +00:00
hooks-initialize-port.mjs
hooks-initialize.mjs
hooks-input.mjs module: link module with a module request record 2025-07-08 11:16:18 -03:00
http-loader.mjs
js-as-esm.js
loader-delayed-async-load.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-dep.js
loader-edge-cases.mjs
loader-exit-on-load.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-exit-on-resolve.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-exit-top-level.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-globalpreload-and-initialize.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-globalpreload-only.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-globalpreload-with-return.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-initialize-exit.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-initialize-never-settling.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-initialize-rejecting.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-initialize-throw-null.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-invalid-format.mjs
loader-invalid-url.mjs
loader-load-bad-next-context.mjs
loader-load-bad-next-url.mjs
loader-load-commonjs-with-source.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-load-dynamic-import.mjs
loader-load-foo-or-42.mjs
loader-load-impersonating-next-url.mjs
loader-load-incomplete.mjs
loader-load-next-modified.mjs
loader-load-null-return.mjs
loader-load-passing-modified-context.mjs
loader-load-passthru.mjs
loader-load-receiving-modified-context.mjs
loader-load-source-maps.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-log-args.mjs
loader-mixed-opt-in.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-resolve-42.mjs
loader-resolve-bad-next-context.mjs
loader-resolve-bad-next-specifier.mjs
loader-resolve-dynamic-import.mjs
loader-resolve-foo.mjs
loader-resolve-incomplete.mjs
loader-resolve-multiple-next-calls.mjs
loader-resolve-next-modified.mjs
loader-resolve-null-return.mjs
loader-resolve-passing-modified-context.mjs
loader-resolve-passthru.mjs
loader-resolve-receiving-modified-context.mjs
loader-resolve-shortcircuit.mjs
loader-resolve-strip-xxx.mjs
loader-resolve-strip-yyy.mjs
loader-shared-dep.mjs
loader-this-value-inside-hook-functions.mjs
loader-throw-bigint.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-throw-boolean.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-throw-empty-object.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-throw-error.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-throw-function.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-throw-null.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-throw-number.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-throw-object.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-throw-string.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-throw-symbol.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-throw-undefined.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
loader-unknown-builtin-module.mjs
loader-with-custom-condition.mjs module: unflag --experimental-require-module 2024-09-26 14:21:37 +00:00
loader-with-dep.mjs
loader-with-too-many-args.mjs
loader-worker-spawn.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
missing-dynamic-instantiate-hook.mjs
mock-loader.mjs
mock.mjs
module-named-exports.mjs
not-found-assert-loader.mjs Revert "module: have a single hooks thread for all workers" 2024-06-02 22:10:34 +00:00
preset-cjs-source.mjs
register-hooks-with-current-cwd-parent-url.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
register-loader-with-url-parenturl.mjs test: split test-esm-loader-hooks 2026-01-27 22:52:26 +01:00
register-loader.cjs
register-loader.mjs
register-programmatically-loader-load.mjs
register-programmatically-loader-resolve.mjs
string-sources.mjs
syntax-error.mjs
thenable-load-hook-rejected-no-arguments.mjs
thenable-load-hook-rejected.mjs
thenable-load-hook.mjs
throw-undefined.mjs