node/test/es-module
Dario Piotrowicz 5e51c62569
src: fix process exit listeners not receiving unsettled tla codes
fix listeners registered via `process.on('exit', ...` not receiving
error code 13 when an unsettled top-level-await is encountered in
the code

PR-URL: https://github.com/nodejs/node/pull/56872
Fixes: https://github.com/nodejs/node/issues/53551
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-03-11 19:40:07 +01:00
..
es-module.status Revert "test: set test-esm-loader-resolve-type as flaky" 2023-10-21 15:54:28 +00:00
test-cjs-esm-warn.js module: unflag --experimental-require-module 2024-09-26 14:21:37 +00:00
test-cjs-legacyMainResolve-permission.js src,lib: stabilize permission model 2024-12-18 22:31:01 +01:00
test-cjs-legacyMainResolve.js esm: do not interpret "main" as a URL 2024-09-27 10:05:50 +00:00
test-cjs-prototype-pollution.js
test-disable-require-module-with-detection.js module: check --experimental-require-module separately from detection 2024-10-08 20:26:13 +00:00
test-dynamic-import-script-lifetime.js
test-esm-assert-strict.mjs
test-esm-assertionless-json-import.js esm: use import attributes instead of import assertions 2023-10-14 03:52:38 +00:00
test-esm-basic-imports.mjs
test-esm-child-process-fork-main.mjs
test-esm-cjs-builtins.js
test-esm-cjs-exports.js module: unflag detect-module 2024-07-20 18:30:46 +00:00
test-esm-cjs-load-error-note.mjs module: add dynamic file-specific ESM warnings 2025-03-09 11:38:39 +01:00
test-esm-cjs-main.js
test-esm-cjs-named-error.mjs test: ensure never settling promises are detected 2023-10-23 17:55:50 +00:00
test-esm-custom-exports.mjs
test-esm-cyclic-dynamic-import.mjs
test-esm-data-urls.js esm: use Undici/fetch data: URL parser 2024-09-07 10:22:03 +02:00
test-esm-default-type.mjs
test-esm-detect-ambiguous.mjs module: remove --experimental-default-type 2024-12-03 11:48:04 +01:00
test-esm-dns-promises.mjs
test-esm-double-encoding.mjs
test-esm-dynamic-import-attribute.js esm: use import attributes instead of import assertions 2023-10-14 03:52:38 +00:00
test-esm-dynamic-import-attribute.mjs esm: use import attributes instead of import assertions 2023-10-14 03:52:38 +00:00
test-esm-dynamic-import-commonjs.js esm: do not call getSource when format is commonjs 2023-11-29 09:21:54 +00:00
test-esm-dynamic-import-commonjs.mjs esm: do not call getSource when format is commonjs 2023-11-29 09:21:54 +00:00
test-esm-dynamic-import-mutating-fs.js
test-esm-dynamic-import-mutating-fs.mjs
test-esm-dynamic-import.js vm: allow dynamic import with a referrer realm 2023-11-01 06:05:13 +00:00
test-esm-encoded-path-native.js
test-esm-encoded-path.mjs
test-esm-error-cache.js
test-esm-example-loader.mjs
test-esm-experimental-warnings.mjs lib,src: drop --experimental-network-imports 2024-07-28 16:33:05 +00:00
test-esm-export-not-found.mjs test: do not set concurrency on parallelized runs 2024-03-23 21:11:28 +00:00
test-esm-exports-deprecations.mjs
test-esm-exports.mjs esm: export 'module.exports' on ESM CJS wrapper 2024-10-02 12:30:23 -07:00
test-esm-extension-lookup-deprecation.mjs test: do not set concurrency on parallelized runs 2024-03-23 21:11:28 +00:00
test-esm-extensionless-esm-and-wasm.mjs module: remove --experimental-default-type 2024-12-03 11:48:04 +01:00
test-esm-forbidden-globals.mjs
test-esm-fs-promises.mjs
test-esm-import-assertion-warning.mjs esm: fix inconsistency with importAssertion in resolve hook 2024-10-19 10:54:37 +02:00
test-esm-import-attributes-1.mjs esm: use import attributes instead of import assertions 2023-10-14 03:52:38 +00:00
test-esm-import-attributes-2.mjs esm: use import attributes instead of import assertions 2023-10-14 03:52:38 +00:00
test-esm-import-attributes-3.mjs esm: use import attributes instead of import assertions 2023-10-14 03:52:38 +00:00
test-esm-import-attributes-errors.js esm: drop support for import assertions 2024-04-19 00:01:24 +00:00
test-esm-import-attributes-errors.mjs esm: drop support for import assertions 2024-04-19 00:01:24 +00:00
test-esm-import-attributes-validation.js esm: rename error code related to import attributes 2023-10-18 14:27:55 +00:00
test-esm-import-flag.mjs module: unflag detect-module 2024-07-20 18:30:46 +00:00
test-esm-import-json-named-export.mjs test: do not set concurrency on parallelized runs 2024-03-23 21:11:28 +00:00
test-esm-import-meta-resolve.mjs esm: fix import.meta.resolve crash 2024-11-16 18:00:55 +01:00
test-esm-import-meta.mjs test: use assert.match in test-esm-import-meta 2025-03-09 11:38:43 +01:00
test-esm-imports-deprecations.mjs
test-esm-imports.mjs esm: export 'module.exports' on ESM CJS wrapper 2024-10-02 12:30:23 -07:00
test-esm-initialization.mjs test: do not set concurrency on parallelized runs 2024-03-23 21:11:28 +00:00
test-esm-invalid-data-urls.js
test-esm-invalid-pjson.js test: use unusual chars in the path to ensure our tests are robust 2025-01-02 15:28:50 +01:00
test-esm-json-cache.mjs esm: use import attributes instead of import assertions 2023-10-14 03:52:38 +00:00
test-esm-json.mjs esm: mark import attributes and JSON module as stable 2024-10-19 10:54:34 +02:00
test-esm-live-binding.mjs
test-esm-loader-cache-clearing.js
test-esm-loader-chaining.mjs test: do not set concurrency on parallelized runs 2024-03-23 21:11:28 +00:00
test-esm-loader-custom-condition.mjs
test-esm-loader-default-resolver.mjs
test-esm-loader-dependency.mjs
test-esm-loader-entry-url.mjs module: unflag --experimental-strip-types 2025-01-02 15:28:49 +01:00
test-esm-loader-event-loop.mjs
test-esm-loader-hooks.mjs src,loader,permission: throw on InternalWorker use 2025-01-19 18:05:58 -03:00
test-esm-loader-http-imports.mjs test: do not set concurrency on parallelized runs 2024-03-23 21:11:28 +00:00
test-esm-loader-invalid-format.mjs
test-esm-loader-invalid-url.mjs
test-esm-loader-mock.mjs Revert "module: have a single hooks thread for all workers" 2024-06-02 22:10:34 +00:00
test-esm-loader-modulemap.js module: support require()ing synchronous ESM graphs 2024-03-18 18:10:06 +08:00
test-esm-loader-not-found.mjs
test-esm-loader-programmatically.mjs test: do not set concurrency on parallelized runs 2024-03-23 21:11:28 +00:00
test-esm-loader-resolve-type.mjs test: use tmpdir.refresh() in test-esm-loader-resolve-type.mjs 2023-12-20 18:17:31 +00:00
test-esm-loader-search.js
test-esm-loader-spawn-promisified.mjs module: prevent main thread exiting before esm worker ends 2024-12-13 16:52:58 +01:00
test-esm-loader-stringify-text.mjs
test-esm-loader-thenable.mjs test: do not set concurrency on parallelized runs 2024-03-23 21:11:28 +00:00
test-esm-loader-with-source.mjs esm: do not call getSource when format is commonjs 2023-11-29 09:21:54 +00:00
test-esm-loader-with-syntax-error.mjs test: do not set concurrency on parallelized runs 2024-03-23 21:11:28 +00:00
test-esm-loader.mjs esm: fix hook name in error message 2023-12-05 19:54:01 +01:00
test-esm-long-path-win.js module: add dynamic file-specific ESM warnings 2025-03-09 11:38:39 +01:00
test-esm-main-lookup.mjs esm: add a fallback when importer in not a file 2024-10-23 22:54:21 +02:00
test-esm-module-not-found-commonjs-hint.mjs test: do not set concurrency on parallelized runs 2024-03-23 21:11:28 +00:00
test-esm-named-exports.mjs Revert "module: have a single hooks thread for all workers" 2024-06-02 22:10:34 +00:00
test-esm-namespace.mjs
test-esm-no-addons.mjs test: change jenkins reporter 2025-02-05 10:35:23 +01:00
test-esm-non-js.mjs test: do not set concurrency on parallelized runs 2024-03-23 21:11:28 +00:00
test-esm-nowarn-exports.mjs test: do not set concurrency on parallelized runs 2024-03-23 21:11:28 +00:00
test-esm-path-posix.mjs
test-esm-path-win32.mjs
test-esm-pkgname.mjs test: refactor some esm tests 2024-11-06 11:48:35 +01:00
test-esm-preserve-symlinks-main.js test: do not set concurrency on parallelized runs 2024-03-23 21:11:28 +00:00
test-esm-preserve-symlinks-not-found-plain.mjs
test-esm-preserve-symlinks-not-found.mjs
test-esm-preserve-symlinks.js
test-esm-process.mjs
test-esm-prototype-pollution.mjs
test-esm-recursive-cjs-dependencies.mjs
test-esm-repl-imports.js test: do not set concurrency on parallelized runs 2024-03-23 21:11:28 +00:00
test-esm-repl.js
test-esm-require-cache.mjs
test-esm-resolve-type.mjs test: rely less on duplicative common test harness utilities 2025-01-30 10:44:34 +01:00
test-esm-scope-node-modules.mjs
test-esm-shared-loader-dep.mjs
test-esm-shebang.mjs
test-esm-snapshot.mjs
test-esm-source-map.mjs test: do not set concurrency on parallelized runs 2024-03-23 21:11:28 +00:00
test-esm-symlink-main.js
test-esm-symlink-type.js
test-esm-symlink.js
test-esm-syntax-error.mjs test: do not set concurrency on parallelized runs 2024-03-23 21:11:28 +00:00
test-esm-throw-undefined.mjs
test-esm-tla-unfinished.mjs src: fix process exit listeners not receiving unsettled tla codes 2025-03-11 19:40:07 +01:00
test-esm-tla.mjs
test-esm-type-field-errors-2.js module: unflag --experimental-require-module 2024-09-26 14:21:37 +00:00
test-esm-type-field-errors.js module: unflag --experimental-require-module 2024-09-26 14:21:37 +00:00
test-esm-type-field.mjs
test-esm-type-main.mjs
test-esm-undefined-cjs-global-like-variables.js
test-esm-unknown-extension.js test: do not set concurrency on parallelized runs 2024-03-23 21:11:28 +00:00
test-esm-url-extname.js
test-esm-util-types.mjs
test-esm-virtual-json.mjs Revert "module: have a single hooks thread for all workers" 2024-06-02 22:10:34 +00:00
test-esm-wasm.mjs test: do not set concurrency on parallelized runs 2024-03-23 21:11:28 +00:00
test-esm-windows.js
test-import-module-conditional-exports-module.mjs module: implement the "module-sync" exports condition 2024-09-25 06:35:26 +00:00
test-loaders-hidden-from-users.js
test-loaders-unknown-builtin-module.mjs
test-loaders-workers-spawned.mjs test: make test-loaders-workers-spawned less flaky 2024-10-08 10:43:20 +00:00
test-require-as-esm-interop.mjs module: support 'module.exports' interop export in require(esm) 2024-10-01 21:13:03 -07:00
test-require-module-cached-tla.js module: support require()ing synchronous ESM graphs 2024-03-18 18:10:06 +08:00
test-require-module-conditional-exports-module.js module: implement the "module-sync" exports condition 2024-09-25 06:35:26 +00:00
test-require-module-conditional-exports.js module: support require()ing synchronous ESM graphs 2024-03-18 18:10:06 +08:00
test-require-module-cycle-cjs-esm-esm.js module: cache synchronous module jobs before linking 2024-05-09 00:25:14 +00:00
test-require-module-cycle-esm-cjs-esm-esm.js module: disallow CJS <-> ESM edges in a cycle from require(esm) 2024-04-08 14:45:55 +00:00
test-require-module-cycle-esm-cjs-esm.js module: disallow CJS <-> ESM edges in a cycle from require(esm) 2024-04-08 14:45:55 +00:00
test-require-module-cycle-esm-esm-cjs-esm-esm.js module: disallow CJS <-> ESM edges in a cycle from require(esm) 2024-04-08 14:45:55 +00:00
test-require-module-cycle-esm-esm-cjs-esm.js module: disallow CJS <-> ESM edges in a cycle from require(esm) 2024-04-08 14:45:55 +00:00
test-require-module-default-extension.js module: add __esModule to require()'d ESM 2024-07-11 18:59:31 +00:00
test-require-module-defined-esmodule.js module: add __esModule to require()'d ESM 2024-07-11 18:59:31 +00:00
test-require-module-detect-entry-point-aou.js module: unflag detect-module 2024-07-20 18:30:46 +00:00
test-require-module-detect-entry-point.js module: unflag detect-module 2024-07-20 18:30:46 +00:00
test-require-module-dont-detect-cjs.js module: unflag detect-module 2024-07-20 18:30:46 +00:00
test-require-module-dynamic-import-1.js module: add __esModule to require()'d ESM 2024-07-11 18:59:31 +00:00
test-require-module-dynamic-import-2.js module: add __esModule to require()'d ESM 2024-07-11 18:59:31 +00:00
test-require-module-dynamic-import-3.js module: add __esModule to require()'d ESM 2024-07-11 18:59:31 +00:00
test-require-module-dynamic-import-4.js module: add __esModule to require()'d ESM 2024-07-11 18:59:31 +00:00
test-require-module-error-catching.js module: mark evaluation rejection in require(esm) as handled 2024-12-06 15:26:43 +01:00
test-require-module-errors.js module: support require()ing synchronous ESM graphs 2024-03-18 18:10:06 +08:00
test-require-module-feature-detect.js process: add process.features.require_module 2024-10-07 15:26:10 +00:00
test-require-module-implicit.js module: unflag detect-module 2024-07-20 18:30:46 +00:00
test-require-module-preload.js module: only emit require(esm) warning under --trace-require-module 2024-12-13 16:54:36 +01:00
test-require-module-retry-import-errored.js module: allow ESM that failed to be required to be re-imported 2024-11-01 16:00:12 -03:00
test-require-module-retry-import-evaluating.js module: allow ESM that failed to be required to be re-imported 2024-11-01 16:00:12 -03:00
test-require-module-synchronous-rejection-handling.js module: mark evaluation rejection in require(esm) as handled 2024-12-06 15:26:43 +01:00
test-require-module-tla-execution.js module: improve error message from asynchronicity in require(esm) 2025-02-25 17:51:01 +01:00
test-require-module-tla-nested.js module: improve error message from asynchronicity in require(esm) 2025-02-25 17:51:01 +01:00
test-require-module-tla-print-execution.js module: improve error message from asynchronicity in require(esm) 2025-02-25 17:51:01 +01:00
test-require-module-tla-rejected.js module: improve error message from asynchronicity in require(esm) 2025-02-25 17:51:01 +01:00
test-require-module-tla-resolved.js module: improve error message from asynchronicity in require(esm) 2025-02-25 17:51:01 +01:00
test-require-module-tla-retry-import-2.js module: allow ESM that failed to be required to be re-imported 2024-11-01 16:00:12 -03:00
test-require-module-tla-retry-import.js module: allow ESM that failed to be required to be re-imported 2024-11-01 16:00:12 -03:00
test-require-module-tla-retry-require.js module: fix error thrown from require(esm) hitting TLA repeatedly 2024-11-01 16:00:14 -03:00
test-require-module-tla-unresolved.js module: improve error message from asynchronicity in require(esm) 2025-02-25 17:51:01 +01:00
test-require-module-transpiled.js module: add __esModule to require()'d ESM 2024-07-11 18:59:31 +00:00
test-require-module-twice.js module: support require()ing synchronous ESM graphs 2024-03-18 18:10:06 +08:00
test-require-module-warning.js module: only emit require(esm) warning under --trace-require-module 2024-12-13 16:54:36 +01:00
test-require-module-with-detection.js module: unflag detect-module 2024-07-20 18:30:46 +00:00
test-require-module.js module: only emit require(esm) warning under --trace-require-module 2024-12-13 16:54:36 +01:00
test-require-node-modules-warning.js module: only emit require(esm) warning under --trace-require-module 2024-12-13 16:54:36 +01:00
test-typescript-commonjs.mjs module: add dynamic file-specific ESM warnings 2025-03-09 11:38:39 +01:00
test-typescript-eval.mjs test: module syntax should throw 2025-03-09 11:38:39 +01:00
test-typescript-module.mjs module: unflag --experimental-strip-types 2025-01-02 15:28:49 +01:00
test-typescript-transform.mjs test: module syntax should throw 2025-03-09 11:38:39 +01:00
test-typescript.mjs module: add ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX 2025-01-30 10:44:30 +01:00
test-vm-compile-function-leak.js
test-vm-compile-function-lineoffset.js
test-vm-contextified-script-leak.js
test-vm-main-context-default-loader.js test: rely less on duplicative common test harness utilities 2025-01-30 10:44:34 +01:00
test-vm-source-text-module-leak.js v8: implement v8.queryObjects() for memory leak regression testing 2024-03-02 22:11:30 +00:00
test-vm-synthetic-module-leak.js
test-wasm-memory-out-of-bound.js
test-wasm-simple.js
test-wasm-web-api.js test: fix typos 2024-09-28 13:58:55 +00:00
testcfg.py