Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add "test" namespace to node.config.json #57559

Open
marco-ippolito opened this issue Mar 20, 2025 · 3 comments
Open

add "test" namespace to node.config.json #57559

marco-ippolito opened this issue Mar 20, 2025 · 3 comments
Labels
config Issues or PRs related to the config subsystem feature request Issues that request new features to be added to Node.js. test_runner Issues and PRs related to the test runner subsystem.

Comments

@marco-ippolito
Copy link
Member

marco-ippolito commented Mar 20, 2025

What is the problem this feature will solve?

I was suggested a few times that a test namespace would be beneficial for the test runner.
It could fix issues like #51384

What is the feature you are proposing to solve the problem?

A test namespace with configurations for the test runner, for coverage, filtering etc...
Still need to create a draft of what it could look like

What alternatives have you considered?

none

cc @nodejs/test_runner @cjihrig

@marco-ippolito marco-ippolito added the feature request Issues that request new features to be added to Node.js. label Mar 20, 2025
@github-project-automation github-project-automation bot moved this to Awaiting Triage in Node.js feature requests Mar 20, 2025
@marco-ippolito marco-ippolito added test_runner Issues and PRs related to the test runner subsystem. config Issues or PRs related to the config subsystem labels Mar 20, 2025
@cjihrig
Copy link
Contributor

cjihrig commented Mar 20, 2025

For additional context:

#51384 is a fairly simple issue to fix from a technical standpoint - allow the test runner to read flags from process.argv instead of only reading from process.execArgv. However, I don't think that should ever be the default behavior because it is inconsistent with how every other Node.js flag is handled. I also don't think it makes sense to add a dedicated CLI flag for that behavior.

If the new config file was capable of setting options that do not correspond to CLI flags, I think this would be a good fit.

@MoLow
Copy link
Member

MoLow commented Mar 23, 2025

I also wonder if the config file can accept code and not just json values, for example for defining global test hooks, or global state & setup

@marco-ippolito
Copy link
Member Author

I also wonder if the config file can accept code and not just json values, for example for defining global test hooks, or global state & setup

Its a json file so they have to be json properties but you can setup a hook pointing to a file like loaders

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config Issues or PRs related to the config subsystem feature request Issues that request new features to be added to Node.js. test_runner Issues and PRs related to the test runner subsystem.
Projects
Status: Awaiting Triage
Development

No branches or pull requests

3 participants