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

Commit 896d890

Browse files
authored
Only retry Jest tests in CI mode (#12111)
Signed-off-by: Michael Telatynski <[email protected]>
1 parent 35e99d6 commit 896d890

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/setupTests.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ beforeEach(() => {
3838
});
3939

4040
// Retry to work around our flaky app & tests
41-
jest.retryTimes(2, {
42-
logErrorsBeforeRetry: true,
43-
});
41+
if (process.env.CI) {
42+
jest.retryTimes(2, {
43+
logErrorsBeforeRetry: true,
44+
});
45+
}
4446

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

0 commit comments

Comments
 (0)