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: allow subtest filtering via --test-name-pattern #46883

Closed

Conversation

richiemccoll
Copy link
Contributor

@richiemccoll richiemccoll commented Feb 28, 2023

Fixes #46728.

This PR allows users to filter subtests via the --test-name-pattern cli flag. This will only run the subtests with a name that matches the specified, scoped regex. Scoping tests can be done via the > character, as suggested here.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added dont-land-on-v14.x needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Feb 28, 2023
lib/internal/test_runner/test.js Outdated Show resolved Hide resolved
lib/internal/test_runner/test.js Outdated Show resolved Hide resolved
// eslint-disable-next-line no-use-before-define
this instanceof TestHook ||
ArrayPrototypeSome(testNamePatterns, (re) => {
const scopedTestNamePatterns = StringPrototypeSplit(re, '>');
Copy link
Member

Choose a reason for hiding this comment

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

i think this may need to use RegExpPrototypeSymbolSplit

@simoneb
Copy link
Contributor

simoneb commented Apr 14, 2023

what's the status on this one?

@cjihrig
Copy link
Contributor

cjihrig commented May 24, 2023

@richiemccoll are you still working on this, or should we close it out?

@richiemccoll
Copy link
Contributor Author

apologies @simoneb, @cjihrig I've just seen the notifications. I haven't had any time to circle back to this one. I'll close this and allow someone else that is interested to pick it up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

Test runner should allow specific subtest filtering, via --test-name-pattern or otherwise
6 participants