Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Only retry Jest tests in CI mode (#12111)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy authored Jan 8, 2024
1 parent 35e99d6 commit 896d890
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ beforeEach(() => {
});

// Retry to work around our flaky app & tests
jest.retryTimes(2, {
logErrorsBeforeRetry: true,
});
if (process.env.CI) {
jest.retryTimes(2, {
logErrorsBeforeRetry: true,
});
}

// Very carefully enable the mocks for everything else in
// a specific order. We use this order to ensure we properly
Expand Down

0 comments on commit 896d890

Please sign in to comment.