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

Test runner: add 'testOnly' parameter to 'run' function #49733

Closed
koshic opened this issue Sep 20, 2023 · 0 comments · Fixed by #49743 or #49753
Closed

Test runner: add 'testOnly' parameter to 'run' function #49733

koshic opened this issue Sep 20, 2023 · 0 comments · Fixed by #49743 or #49753
Labels
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

@koshic
Copy link

koshic commented Sep 20, 2023

What is the problem this feature will solve?

As a developer, I want to be able use test runner programmatically via 'run' function and execute only tests marked with 'only' option. Currently it's possible only via CLI be adding '--test-only' parameter, or with dirty hack (see alternatives section).

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

Add 'testOnly' to 'run' parameters, similar to existing 'watch' or 'testNamePatterns'. It would be nice to have all test runner options available both on CLI and runtime API.

What alternatives have you considered?

Add '--test-only' to NODE_OPTIONS env variable before 'run' call. It works fine, but looks a bit ugly.

@koshic koshic added the feature request Issues that request new features to be added to Node.js. label Sep 20, 2023
@MoLow MoLow added the test_runner Issues and PRs related to the test runner subsystem. label Sep 20, 2023
@MoLow MoLow reopened this Sep 21, 2023
nodejs-github-bot pushed a commit that referenced this issue Sep 24, 2023
PR-URL: #49753
Fixes: #49733
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Raz Luvaton <[email protected]>
ruyadorno pushed a commit that referenced this issue Sep 28, 2023
PR-URL: #49753
Fixes: #49733
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Raz Luvaton <[email protected]>
alexfernandez pushed a commit to alexfernandez/node that referenced this issue Nov 1, 2023
PR-URL: nodejs#49753
Fixes: nodejs#49733
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Raz Luvaton <[email protected]>
targos pushed a commit that referenced this issue Nov 27, 2023
PR-URL: #49753
Fixes: #49733
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Raz Luvaton <[email protected]>
sercher added a commit to sercher/graaljs that referenced this issue Apr 25, 2024
PR-URL: nodejs/node#49753
Fixes: nodejs/node#49733
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Raz Luvaton <[email protected]>
sercher added a commit to sercher/graaljs that referenced this issue Apr 25, 2024
PR-URL: nodejs/node#49753
Fixes: nodejs/node#49733
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Raz Luvaton <[email protected]>
@RedYetiDev RedYetiDev moved this from Awaiting Triage to Done in Node.js feature requests Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
None yet
Development

Successfully merging a pull request may close this issue.

2 participants