node/lib/internal/test_runner/mock
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
..
loader.js test_runner: add exports option for module mocks 2026-03-30 17:20:28 +02:00
mock.js test_runner: add exports option for module mocks 2026-03-30 17:20:28 +02:00
mock_timers.js lib: add lint rules for reflective function calls 2026-01-13 10:04:32 -03:00