Skip to content

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

Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom
avivkeller:patch-29
Aug 16, 2024
Merged

cli: allow --test-[name/skip]-pattern in NODE_OPTIONS#53001
nodejs-github-bot merged 1 commit intonodejs:mainfrom
avivkeller:patch-29

Conversation

@avivkeller
Copy link
Copy Markdown
Member

@avivkeller avivkeller 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
@avivkeller avivkeller added cli Issues and PRs related to the Node.js command line interface. test_runner Issues and PRs related to the test runner subsystem. labels May 15, 2024
@cjihrig
Copy link
Copy Markdown
Contributor

cjihrig commented May 15, 2024

Just an FYI - this does not fix #51384.

@avivkeller
Copy link
Copy Markdown
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
Copy Markdown
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.

@cjihrig
Copy link
Copy Markdown
Contributor

cjihrig commented Aug 13, 2024

@redyetidev are you planning to pursue this?

@avivkeller
Copy link
Copy Markdown
Member Author

Sure, I didn't realize there were conflicts. I'll fix them now :-)

@avivkeller
Copy link
Copy Markdown
Member Author

Conflicts resolved

Copy link
Copy Markdown
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if the CI passes.

@cjihrig cjihrig added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 13, 2024
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 13, 2024
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@avivkeller
Copy link
Copy Markdown
Member Author

CI is passing except for unrelated failures :-)

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@cjihrig cjihrig added the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 16, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 16, 2024
@nodejs-github-bot nodejs-github-bot merged commit 59da1df into nodejs:main Aug 16, 2024
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Landed in 59da1df

RafaelGSS pushed a commit that referenced this pull request Aug 19, 2024
PR-URL: #53001
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
@RafaelGSS RafaelGSS mentioned this pull request Aug 19, 2024
RafaelGSS pushed a commit that referenced this pull request Aug 21, 2024
PR-URL: #53001
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
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 Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants