Skip to content

module: move test reporter loading

This PR resolves my concerns with https://github.com/nodejs/node/pull/45712#issuecomment-1358885878, without making any changes to --test-reporter or breaking any tests. Essentially, it moves the module loading that --test-reporter wants to do to happen inside the test_runner section of the codebase, keeping it separate; and it loads all test reporters through the ESM loader, following our current design for module loading features and preserving support for things like loaders applying to test reporters.

All changes in this PR for files under lib/internal/modules are just reverting the changes to those files that landed in #45712.

cc @nodejs/test_runner @nodejs/loaders @nodejs/modules

Merge request reports

Loading