nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
106.29k stars 28.95k forks source link

test_runner: do not read from `process.argv` and `process.cwd()` in run() #53867

Open mcollina opened 1 month ago

mcollina commented 1 month ago

Currently the codebase for https://github.com/nodejs/node/blob/362afa52ebe462a39874915e5e70d261db153c58/lib/internal/test_runner/runner.js#L472 accesses some poperties of process, capturing some options there. However, we also expose run() to the end users, therefore we should capture all this information in https://github.com/nodejs/node/blob/362afa52ebe462a39874915e5e70d261db153c58/lib/internal/main/test_runner.js#L68 and pass it down to run() as options.

eliphazb commented 1 month ago

@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 :)

mcollina commented 1 month ago

It's likely best to wait until my PR lands first!

eliphazb commented 1 month ago

Okay, I'll wait :)

mcollina commented 1 month ago

@eliphazb go ahead and make the PR!

eliphazb commented 1 month ago

Okay 🚀 I'm going

eliphazb commented 4 weeks ago

@mcollina someone already take it :(

mcollina commented 2 weeks ago

@SophonieBouye doesn't look like it to me. There is a lot more to be done here.