FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test_runner: do not invoke after hook when test is empty by marco-ippolito · Pull Request #51389 · nodejs/node · GitHub

/ node Public

test_runner: do not invoke after hook when test is empty - #51389

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
marco-ippolito:feat/fix-after-hook
Jan 8, 2024
Merged

test_runner: do not invoke after hook when test is empty#51389
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
marco-ippolito:feat/fix-after-hook

Conversation

marco-ippolito commented Jan 5, 2024
edited
Loading

Copy link
Copy Markdown
Member

Fixes: #51371
(recreated because apparently if you force push on a closed PR it cannot be reopened)

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

nodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Jan 5, 2024
Comment on lines +6 to +10
test('test', async (t) => {
t.after(common.mustNotCall(() => {
t.fail('should not run');
}));
});

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
test('test', async (t) => {
t.after(common.mustNotCall(() => {
t.fail('should not run');
}));
});
test('test', (t) => {
t.after(common.mustNotCall());
});

lpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 6, 2024
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 6, 2024

Copy link
Copy Markdown
Collaborator

marco-ippolito added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Jan 7, 2024
marco-ippolito added the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 8, 2024
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 8, 2024
nodejs-github-bot merged commit a53fd95 into nodejs:main Jan 8, 2024

Copy link
Copy Markdown
Collaborator

Landed in a53fd95

marco-ippolito added a commit to marco-ippolito/node that referenced this pull request Jan 12, 2024
PR-URL: nodejs#51389
Fixes: nodejs#51371
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Medhansh404 pushed a commit to Medhansh404/node that referenced this pull request Jan 19, 2024
PR-URL: nodejs#51389
Fixes: nodejs#51371
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
targos pushed a commit that referenced this pull request Feb 15, 2024
PR-URL: #51389
Fixes: #51371
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
marco-ippolito mentioned this pull request Mar 1, 2024

Copy link
Copy Markdown
Member

This is being reverted in #51998

targos added a commit that referenced this pull request Mar 7, 2024
Notable changes:

This release reverts #51389,
which landed in Node.js 21.7.0. It is a documented feature that
`t.after()` hooks are run even if a test has no subtests. The hook can
be used to clean up the test itself.

PR-URL: #52002
targos mentioned this pull request Mar 7, 2024
targos added a commit that referenced this pull request Mar 8, 2024
Notable changes:

This release reverts #51389,
which landed in Node.js 21.7.0. It is a documented feature that
`t.after()` hooks are run even if a test has no subtests. The hook can
be used to clean up the test itself.

PR-URL: #52002
targos added a commit that referenced this pull request Mar 8, 2024
Notable changes:

This release reverts #51389,
which landed in Node.js 21.7.0. It is a documented feature that
`t.after()` hooks are run even if a test has no subtests. The hook can
be used to clean up the test itself.

PR-URL: #52002
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. 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: after() hook is called for no subtests

5 participants


Back | FazBrowse Home | New Git URL