You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How often does it reproduce? Is there a required condition?
each execution, no required condition
What is the expected behavior? Why is that the expected behavior?
before and after hooks should be executed
What do you see instead?
test insideit insidebefore outsidetest outsideit outside▶ describe block ✔ test inside (0.9725ms) ✔ test inside (0.610209ms)▶ describe block (2.832542ms)✔ outside test (0.516125ms)✔ outside it (0.097375ms)ℹ tests 4ℹ suites 1ℹ pass 4ℹ fail 0ℹ cancelled 0ℹ skipped 0ℹ todo 0ℹ duration_ms 13.303583
Additional information
Hi,
I've been playing with the test framework and trying to migrate tests from jest to nodes new tests runner. I found a few cases where before and after hooks are not executed
I don't know if this is a bug or works as designed, but the documentation could maybe be more clear when the hooks our not supported.
maybe node can warn that the hook is not supposed.
In jest for example a hook in the test itself is not supported and if doing so a warning is displayed
Hooks cannot be defined inside tests. Hook of type "beforeAll" is nested within "test inside".
If there are changes needed I would be glad to try to do the modification if it's not too complicated
The text was updated successfully, but these errors were encountered:
Version
v20.1.0
Platform
Darwin Kalmans-MacBook-Pro.local 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103 x86_64
Subsystem
test_runner
What steps will reproduce the bug?
run the following code, logs are not written to console
How often does it reproduce? Is there a required condition?
each execution, no required condition
What is the expected behavior? Why is that the expected behavior?
before and after hooks should be executed
What do you see instead?
Additional information
Hi,
I've been playing with the test framework and trying to migrate tests from jest to nodes new tests runner. I found a few cases where before and after hooks are not executed
I don't know if this is a bug or works as designed, but the documentation could maybe be more clear when the hooks our not supported.
maybe node can warn that the hook is not supposed.
In jest for example a hook in the test itself is not supported and if doing so a warning is displayed
If there are changes needed I would be glad to try to do the modification if it's not too complicated
The text was updated successfully, but these errors were encountered: