From 896d89019806e5335febac6d9c6abb298ee4d331 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 8 Jan 2024 12:05:02 +0000 Subject: [PATCH] Only retry Jest tests in CI mode (#12111) Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- test/setupTests.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/setupTests.ts b/test/setupTests.ts index f5282231dc..fa99913b56 100644 --- a/test/setupTests.ts +++ b/test/setupTests.ts @@ -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