Skip to content

Conversation

@MoLow
Copy link
Member

@MoLowMoLow commented Jun 7, 2023

@MoLowMoLow requested a review from cjihrigJune 7, 2023 19:06
@nodejs-github-bot
Copy link
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
Copy link
MemberAuthor

MoLow commented Jun 7, 2023

I am not sure if this should be smver-major

@benjamingr
Copy link
Member

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

Copy link
Contributor

@cjihrigcjihrig left a comment

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.

test('enabled and only',{only: true},common.mustCall(async(t)=>{
awaitt.test('enabled',common.mustCall());
awaitt.test('disabled',common.mustNotCall());
awaitt.test('disabled but parent not',common.mustCall());
Copy link
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
MemberAuthor

Choose a reason for hiding this comment

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

Copy link
Member

@targostargosJun 9, 2023

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
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
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
Copy link
MemberAuthor

MoLow commented Jun 9, 2023

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.

@MoLowMoLow 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
Collaborator

@MoLowMoLow 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
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 [email protected]
Reviewed-By: Colin Ihrig [email protected]

[detached HEAD ca883b695b] test_runner: make --test-name-pattern recursive
Author: Moshe Atlow [email protected]
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 [email protected]
Reviewed-By: Colin Ihrig [email protected]

[detached HEAD fbfa977150] CR
Author: Moshe Atlow [email protected]
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-botnodejs-github-bot merged commit c21fe3a into nodejs:mainJun 11, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in c21fe3a

@MoLowMoLow 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 <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
@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 <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
PR-URL: nodejs#48382 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
ruyadorno pushed a commit that referenced this pull request Sep 7, 2023
PR-URL: #48382 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
@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