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

cli: allow --test-[name/skip]-pattern in NODE_OPTIONS #53001

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RedYetiDev
Copy link
Member

@RedYetiDev RedYetiDev commented May 15, 2024

workaround for #51384

NODE_OPTIONS="--test-name-pattern=XXX" node my_test.js

Allows --test-name-pattern and --test-skip-pattern to appear in the NODE_OPTIONS environment variable.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels May 15, 2024
@RedYetiDev RedYetiDev added cli Issues and PRs related to the Node.js command line interface. test_runner labels May 15, 2024
@cjihrig
Copy link
Contributor

cjihrig commented May 15, 2024

Just an FYI - this does not fix #51384.

@RedYetiDev
Copy link
Member Author

Just an FYI - this does not fix #51384.

Why? If these options can be passed as env variables, then they won't be hostile to NPM scripts, as they can be used in the variable? Right?

@cjihrig
Copy link
Contributor

cjihrig commented May 15, 2024

The ask in that issue is to be able to run something like npm test -- --test-name-pattern="my pattern". More generally (based on feedback I've received), people want to be able to mix test runner arguments in process.execArgv and process.argv.

I'm not saying this is a bad change, but this is not what is being requested and I don't think people will be satisfied with it for that use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. cli Issues and PRs related to the Node.js command line interface. needs-ci PRs that need a full CI run. test_runner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants