Skip to content

test_runner: make --test-name-pattern recursive - #48382

Merged
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
MoLow:filter-by-name-recursive
Jun 11, 2023
Merged

test_runner: make --test-name-pattern recursive#48382
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
MoLow:filter-by-name-recursive

Conversation

@MoLow

@MoLowMoLow commented Jun 7, 2023

Copy link
Copy Markdown
Member

@MoLow
MoLow requested a review from cjihrigJune 7, 2023 19:06
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-botnodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Jun 7, 2023
@MoLow

MoLow commented Jun 7, 2023

Copy link
Copy Markdown
MemberAuthor

I am not sure if this should be smver-major

@benjamingr

Copy link
Copy Markdown
Member

Arguably this is a bug fix so II don't think it needs semver-major

@cjihrigcjihrig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As this is currently written, I do believe it's a breaking change. I'm more concerned that I don't think this is the right change based on what is being requested in #46728.

Comment threadtest/fixtures/test-runner/output/name_pattern.js Outdated
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());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why is this running? Is it because the parent is enabled? If so, I don't think that's what #46728 is about.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

@targostargosJun 9, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm fine with this PR now that it's clear this is not fixing #46728.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Can you please approve? :)

@MoLow

MoLow commented Jun 9, 2023

Copy link
Copy Markdown
MemberAuthor

I'm more concerned that I don't think this is the right change based on what is being requested in #46728.

I remove the link between this PR and that issue.
based on the fact this is the behavior of all other test runners I do think it is a required change.

@MoLow
MoLow requested a review from cjihrigJune 9, 2023 03:44
@MoLowMoLow added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Jun 9, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 9, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@MoLow
MoLow requested a review from targosJune 11, 2023 11:58
@MoLowMoLow added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 11, 2023
@nodejs-github-botnodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Jun 11, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator
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)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test_runner: make --test-name-pattern recursive

PR-URL: #48382
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Colin Ihrig cjihrig@gmail.com

[detached HEAD ca883b695b] test_runner: make --test-name-pattern recursive
Author: Moshe Atlow moshe@atlow.co.il
Date: Wed Jun 7 22:04:02 2023 +0300
5 files changed, 124 insertions(+), 31 deletions(-)
Rebasing (3/4)
Rebasing (4/4)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
CR

PR-URL: #48382
Reviewed-By: Benjamin Gruenbaum benjamingr@gmail.com
Reviewed-By: Colin Ihrig cjihrig@gmail.com

[detached HEAD fbfa977150] CR
Author: Moshe Atlow moshe@atlow.co.il
Date: Fri Jun 9 06:45:43 2023 +0300
2 files changed, 13 insertions(+), 13 deletions(-)

Successfully rebased and updated refs/heads/main.

ℹ Add commit-queue-squash label to land the PR as one commit, or commit-queue-rebase to land as separate commits.

https://github.com/nodejs/node/actions/runs/5236052142

@MoLowMoLow added commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Jun 11, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 11, 2023
@nodejs-github-bot
nodejs-github-bot merged commit c21fe3a into nodejs:mainJun 11, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in c21fe3a

@MoLow
MoLow deleted the filter-by-name-recursive branch June 12, 2023 03:16
RafaelGSS pushed a commit that referenced this pull request Jul 3, 2023
PR-URL: #48382
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@RafaelGSSRafaelGSS mentioned this pull request Jul 3, 2023
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
PR-URL: nodejs#48382
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
PR-URL: nodejs#48382
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
ruyadorno pushed a commit that referenced this pull request Sep 7, 2023
PR-URL: #48382
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@ruyadornoruyadorno mentioned this pull request Sep 8, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.commit-queue-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.needs-ciPRs that need a full CI run.test_runnerIssues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@MoLow@nodejs-github-bot@benjamingr@targos@cjihrig