node icon indicating copy to clipboard operation
node copied to clipboard

test_runner: unify --require and --import behavior when isolation none

Open pmarchini opened this issue 8 months ago β€’ 14 comments

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.

pmarchini avatar Apr 18 '25 13:04 pmarchini

Review requested:

  • [ ] @nodejs/test_runner

nodejs-github-bot avatar Apr 18 '25 13:04 nodejs-github-bot

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:

... and 71 files with indirect coverage changes

: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.

codecov[bot] avatar Apr 25 '25 17:04 codecov[bot]

CI: https://ci.nodejs.org/job/node-test-pull-request/66519/

nodejs-github-bot avatar Apr 30 '25 20:04 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/66540/

nodejs-github-bot avatar May 02 '25 10:05 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/66550/

nodejs-github-bot avatar May 02 '25 17:05 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/66557/

nodejs-github-bot avatar May 03 '25 07:05 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/66558/

nodejs-github-bot avatar May 03 '25 10:05 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/66559/

nodejs-github-bot avatar May 03 '25 11:05 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/66561/

nodejs-github-bot avatar May 03 '25 14:05 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/66563/

nodejs-github-bot avatar May 03 '25 15:05 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/66571/

nodejs-github-bot avatar May 03 '25 19:05 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/66572/

nodejs-github-bot avatar May 03 '25 20:05 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/66580/

nodejs-github-bot avatar May 04 '25 12:05 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/66595/

nodejs-github-bot avatar May 04 '25 18:05 nodejs-github-bot

Landed in 7e24ebc78079bc7551b6dd96e1f0d249f4599605

nodejs-github-bot avatar May 06 '25 06:05 nodejs-github-bot

This doesn't land cleanly on v22.x-staging so a manual backport will be necessary if this is to be released there.

richardlau avatar Sep 19 '25 16:09 richardlau