test_runner: make --test-name-pattern recursive#48382
test_runner: make --test-name-pattern recursive#48382nodejs-github-bot merged 2 commits intonodejs:mainfrom
--test-name-pattern recursive#48382Conversation
|
Review requested:
|
|
I am not sure if this should be smver-major |
|
Arguably this is a bug fix so II don't think it needs semver-major |
| test('enabled and only', { only: true }, common.mustCall(async (t) => { | ||
| await t.test('enabled', common.mustCall()); | ||
| await t.test('disabled', common.mustNotCall()); | ||
| await t.test('disabled but parent not', common.mustCall()); |
There was a problem hiding this comment.
Why is this running? Is it because the parent is enabled? If so, I don't think that's what #46728 is about.
There was a problem hiding this comment.
FWIW, this change corresponds to my expectations.
A more realistic use case:
describe('add', () => {
it('should return 2', () => assert.strictEqual(add(1, 1), 2));
it('should return 10', () => assert.strictEqual(add(8, 2), 10));
it('should throw', () => assert.throws(() => add(), TypeError));
});
describe('subtract', () => {
// ...
});node --test-name-pattern=add should run all children of describe('add')
There was a problem hiding this comment.
I'm fine with this PR now that it's clear this is not fixing #46728.
I remove the link between this PR and that issue. |
Commit Queue failed- Loading data for nodejs/node/pull/48382 ✔ Done loading data for nodejs/node/pull/48382 ----------------------------------- PR info ------------------------------------ Title test_runner: make `--test-name-pattern` recursive (#48382) Author Moshe Atlow (@MoLow) Branch MoLow:filter-by-name-recursive -> nodejs:main Labels author ready, needs-ci, test_runner Commits 2 - test_runner: make `--test-name-pattern` recursive - CR Committers 1 - Moshe Atlow PR-URL: https://github.com/nodejs/node/pull/48382 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Colin Ihrig ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/48382 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Colin Ihrig -------------------------------------------------------------------------------- ℹ This PR was created on Wed, 07 Jun 2023 19:06:09 GMT ✔ Approvals: 2 ✔ - Benjamin Gruenbaum (@benjamingr): https://github.com/nodejs/node/pull/48382#pullrequestreview-1469507668 ✔ - Colin Ihrig (@cjihrig) (TSC): https://github.com/nodejs/node/pull/48382#pullrequestreview-1473725491 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2023-06-09T13:01:22Z: https://ci.nodejs.org/job/node-test-pull-request/52180/ - Querying data for job/node-test-pull-request/52180/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD ✔ origin/main is now up-to-date - Downloading patch for 48382 From https://github.com/nodejs/node * branch refs/pull/48382/merge -> FETCH_HEAD ✔ Fetched commits as 4ee8ef269ba4..fb4215b79bc6 -------------------------------------------------------------------------------- [main beee13d595] test_runner: make `--test-name-pattern` recursive Author: Moshe Atlow Date: Wed Jun 7 22:04:02 2023 +0300 5 files changed, 124 insertions(+), 31 deletions(-) [main 233e2f5161] CR Author: Moshe Atlow Date: Fri Jun 9 06:45:43 2023 +0300 2 files changed, 13 insertions(+), 13 deletions(-) ✔ Patches applied There are 2 commits in the PR. Attempting autorebase. Rebasing (2/4)https://github.com/nodejs/node/actions/runs/5236052142 |
|
Landed in c21fe3a |
PR-URL: #48382 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: nodejs#48382 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: nodejs#48382 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #48382 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Refs: #46728 (comment)