-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Do not retry test if beforeAll fails #8227
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing changelog, implementation lgtm 🙂
All set |
packages/jest-circus/src/run.ts
Outdated
@@ -48,9 +48,14 @@ const _runTestsForDescribeBlock = async (describeBlock: DescribeBlock) => { | |||
const deferredRetryTests = []; | |||
|
|||
for (const test of describeBlock.tests) { | |||
const isErrorsBeforeTestRun = test.errors.length > 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: maybe hasErrorsBeforeTestRun
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. I pushed another commit for that just now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great!
Figuring out how to write a test in the e2e suite that will work. Bear with me while I work through this. |
Pushing just so ci is happy seems like a good thing to me 🙂 |
It looks like the test is referencing |
Doh - pushing now |
Ok now that CI is in a good place I can ask for another review :) |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Fixes #8221
If test retries are enabled - do not retry tests when beforeAll/beforeEach fails.
Test plan
Added additional e2e test to test for this regression