Repository navigation
test_runner: do not read from process.argv and process.cwd() in run() #53867
Description
Activity
- addedgood first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
on Jul 16, 2024 - changed the title
[-]test_runner: do not read from `process.argv` in run()[/-][+]test_runner: do not read from `process.argv` and `process.cwd()` in run()[/+]on Jul 16, 2024 @mcollina this issue still relevant or are you already working on it ? I ask it because I see you mentioned it on your last PR !
If it's still relevant, I'll start working on it :)It's likely best to wait until my PR lands first!
Reacted by Eliphaz BouyeOkay, I'll wait :)
- added a commit that references this issue
on Jul 22, 2024 @eliphazb go ahead and make the PR!
Reacted by Eliphaz BouyeOkay 🚀 I'm going
- added a commit that references this issue
on Jul 28, 2024 @mcollina someone already take it :(
- added a commit that references this issue
on Aug 5, 2024 @SophonieBouye doesn't look like it to me. There is a lot more to be done here.
Reacted by Eliphaz Bouye and Moshe Atlow12 remaining items
It's not fixed 😞. There are still a number of uses of process state.
@cjihrig Can you please elaborate a little on what is pending in this? I will pick it up.
I'd like to work on this issue.
- added 2 commits that reference this issue
on May 26, 2026 Hi I would like to work on the issue @mcollina ,can you assign it to me ?
- removedgood first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.
on Aug 12, 2026 Hi, I'd like to work on this issue.
I see that there have been previous linked attempts, but GitHub currently shows no active pull request. Before starting, I'd like to confirm that the proposed direction is still current:
- collect the relevant
process.argv/process.cwd()-derived values inlib/internal/main/test_runner.js; - pass them explicitly through the
run()options; - remove the corresponding global-process reads from
lib/internal/test_runner/runner.js; - update or add focused test-runner tests without changing CLI behavior.
Is this issue still available, and are there any lessons from the previous PRs that I should account for?
- collect the relevant
Currently the codebase for
node/lib/internal/test_runner/runner.js
Line 472 in 362afa5
process, capturing some options there. However, we also exposerun()to the end users, therefore we should capture all this information innode/lib/internal/main/test_runner.js
Line 68 in 362afa5
run()as options.