-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
--test-only produces unexpected results and unexpected call order #54154
Comments
I have not verified it, but I think this issue probably has the same underlying cause as #54084, and is not necessarily related to the after hook. |
That is true, any hook or even |
A usecase for triggering this without explicit |
This commit updates the test runner to wait for suites to finish building before starting any tests. This is necessary when test filtering is enabled, as suites may transition from filtered to not filtered depending on what is inside of them. Fixes: nodejs#54084 Fixes: nodejs#54154
This commit updates the test runner to wait for suites to finish building before starting any tests. This is necessary when test filtering is enabled, as suites may transition from filtered to not filtered depending on what is inside of them. Fixes: nodejs#54084 Fixes: nodejs#54154
This commit updates the test runner to wait for suites to finish building before starting any tests. This is necessary when test filtering is enabled, as suites may transition from filtered to not filtered depending on what is inside of them. Fixes: #54084 Fixes: #54154 PR-URL: #54423 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Jake Yuesong Li <[email protected]>
Version
v22.5.1
Platform
Subsystem
test_runner
What steps will reproduce the bug?
Run this script with
node --test --test-only
~3-5 times:Note that it shows the behavior with and without a bug with probability 0.6 (see top lines), so just launch it until there is a run with
with global after()
line and without it, and compare thoseHow often does it reproduce? Is there a required condition?
Always under a
--test --test-only
flag andif (bug)
replaced toif (true)
In that specific file, with a
0.6
probability to demonstrate the inconsistencyWhat is the expected behavior? Why is that the expected behavior?
Order is preserved + that is what happens in
node --test --test-only
without anafter()
setAlso Jest seems to agree
What do you see instead?
Missing entries, strange (but always reproducible) test execution order
Note that there are even no async tests in the testcase
Additional information
Testcase above does not use
t.fullName
to be less Node.js-specificSimplified but Node.js-specific testcase is:
Expected output:
Actual output:
The text was updated successfully, but these errors were encountered: