-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
afterEach hook not executed when test fails #45192
Labels
test_runner
Issues and PRs related to the test runner subsystem.
Comments
MoLow
added
good first issue
Issues that are suitable for first-time contributors.
test_runner
Issues and PRs related to the test runner subsystem.
and removed
good first issue
Issues that are suitable for first-time contributors.
labels
Oct 26, 2022
I can work on this. |
@MrJithil go for it! |
Done the initial version. Will wait for the suggestions. |
lucshi
pushed a commit
to lucshi/node
that referenced
this issue
Nov 9, 2022
test_runner: fix afterEach not running on test failures PR-URL: nodejs#45204 Fixes: nodejs#45192 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
MoLow
pushed a commit
to MoLow/node
that referenced
this issue
Nov 23, 2022
test_runner: fix afterEach not running on test failures PR-URL: nodejs#45204 Fixes: nodejs#45192 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
MoLow
pushed a commit
to MoLow/node
that referenced
this issue
Nov 23, 2022
test_runner: fix afterEach not running on test failures PR-URL: nodejs#45204 Fixes: nodejs#45192 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
MoLow
pushed a commit
to MoLow/node
that referenced
this issue
Dec 9, 2022
test_runner: fix afterEach not running on test failures PR-URL: nodejs#45204 Fixes: nodejs#45192 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
MoLow
pushed a commit
to MoLow/node-core-test
that referenced
this issue
Feb 2, 2023
test_runner: fix afterEach not running on test failures PR-URL: nodejs/node#45204 Fixes: nodejs/node#45192 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> (cherry picked from commit 3759935ee29d8042d917d3ceaa768521c14413ff)
MoLow
pushed a commit
to MoLow/node-core-test
that referenced
this issue
Feb 2, 2023
PR-URL: nodejs/node#45204 Fixes: nodejs/node#45192 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> (cherry picked from commit 3759935ee29d8042d917d3ceaa768521c14413ff)
MoLow
pushed a commit
to MoLow/node-core-test
that referenced
this issue
Feb 2, 2023
PR-URL: nodejs/node#45204 Fixes: nodejs/node#45192 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> (cherry picked from commit 3759935ee29d8042d917d3ceaa768521c14413ff)
MoLow
pushed a commit
to MoLow/node-core-test
that referenced
this issue
Feb 2, 2023
PR-URL: nodejs/node#45204 Fixes: nodejs/node#45192 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> (cherry picked from commit 3759935ee29d8042d917d3ceaa768521c14413ff)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
v19.0.0
Platform
Darwin Rochs-MBP.localdomain 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000 arm64
Subsystem
node:test
What steps will reproduce the bug?
When a test fails, the
afterEach
hook is not executed.How often does it reproduce? Is there a required condition?
This is always reproducible when the test fails.
What is the expected behavior?
The
afterEach
hook should always be executed, especially since it often serves as a way to clean up resources.What do you see instead?
Only the code for
beforeEach
is executed.Additional information
This also happens with the describe/it syntax.
The text was updated successfully, but these errors were encountered: