node/lib/internal/test_runner
sangwook 2c63d3006c
test_runner: add exports option for module mocks
Add options.exports support in mock.module() and normalize option

shapes through a shared exports path.

Keep defaultExport and namedExports as aliases, emit runtime

deprecation warnings for legacy options, and update docs and tests,

including output fixtures and coverage snapshots.

Refs: https://github.com/nodejs/node/issues/58443
PR-URL: https://github.com/nodejs/node/pull/61727
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-03-30 17:20:28 +02:00
..
mock test_runner: add exports option for module mocks 2026-03-30 17:20:28 +02:00
reporter test_runner: expose expectFailure message 2026-02-28 12:07:01 +01:00
assert.js test_runner: add assert.register() API 2025-01-04 18:30:04 +00:00
coverage.js test_runner: use module.registerHooks in module mocks 2025-10-24 00:49:54 +02:00
harness.js test_runner: show interrupted test on SIGINT 2026-02-19 11:14:03 +01:00
runner.js test_runner: expose worker ID for concurrent test execution 2026-02-28 12:06:59 +01:00
snapshot.js test_runner: replace native methods with primordials 2026-02-28 12:06:58 +01:00
test.js test_runner: make it compatible with fake timers 2026-03-30 17:20:26 +02:00
tests_stream.js test_runner: show interrupted test on SIGINT 2026-02-19 11:14:03 +01:00
utils.js test_runner: set non-zero exit code when suite errors occur 2026-03-30 17:20:26 +02:00