-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
✨ No timeout for beforeEach or afterEach #3464
Conversation
Timeout must only focus on the code under tests, in other words the predicate. It should not be triggered because of a beforeEach being too long, or a afterEach being too long.
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 2b04ffa:
|
Codecov Report
@@ Coverage Diff @@
## main #3464 +/- ##
==========================================
- Coverage 95.49% 95.49% -0.01%
==========================================
Files 213 213
Lines 5842 5876 +34
Branches 1076 1090 +14
==========================================
+ Hits 5579 5611 +32
- Misses 263 265 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Timeout must only focus on the code under tests, in other words the predicate. It should not be triggered because of a beforeEach being too long, or a afterEach being too long.
beforeEach and afterEach must always be run, no matter if the property timeout or not. We want to get closer to the behaviour followed by existing test runners such as jest, see:
Which prints:
And still runs the code after the timeout as it cannot stops it (case where the Promise resolve after N>100ms):
Fixes #3236
Category:
Potential impacts: