test_runner: unify --require and --import behavior when isolation none
I'm opening this PR as a draft to discuss the implementation.
The goal is to address issue #57728.
This PR unifies the behaviour of --require and --import for the specific case where the test runner is run with isolation none.
Review requested:
- [ ] @nodejs/test_runner
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 90.19%. Comparing base (52d95f5) to head (b866b7e).
:warning: Report is 1091 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #57924 +/- ##
==========================================
- Coverage 90.26% 90.19% -0.07%
==========================================
Files 630 630
Lines 185933 186470 +537
Branches 36450 36624 +174
==========================================
+ Hits 167829 168186 +357
- Misses 10972 11061 +89
- Partials 7132 7223 +91
| Files with missing lines | Coverage Ξ | |
|---|---|---|
| lib/internal/main/test_runner.js | 100.00% <100.00%> (ΓΈ) |
|
| lib/internal/process/pre_execution.js | 94.91% <100.00%> (-1.05%) |
:arrow_down: |
| lib/internal/test_runner/runner.js | 89.03% <100.00%> (+0.15%) |
:arrow_up: |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
CI: https://ci.nodejs.org/job/node-test-pull-request/66519/
CI: https://ci.nodejs.org/job/node-test-pull-request/66540/
CI: https://ci.nodejs.org/job/node-test-pull-request/66550/
CI: https://ci.nodejs.org/job/node-test-pull-request/66557/
CI: https://ci.nodejs.org/job/node-test-pull-request/66558/
CI: https://ci.nodejs.org/job/node-test-pull-request/66559/
CI: https://ci.nodejs.org/job/node-test-pull-request/66561/
CI: https://ci.nodejs.org/job/node-test-pull-request/66563/
CI: https://ci.nodejs.org/job/node-test-pull-request/66571/
CI: https://ci.nodejs.org/job/node-test-pull-request/66572/
CI: https://ci.nodejs.org/job/node-test-pull-request/66580/
CI: https://ci.nodejs.org/job/node-test-pull-request/66595/
Landed in 7e24ebc78079bc7551b6dd96e1f0d249f4599605
This doesn't land cleanly on v22.x-staging so a manual backport will be necessary if this is to be released there.