From 9d93a3f54df327d77a43e60fb6fde3986162d2e2 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 15 Dec 2023 13:11:57 +0000 Subject: [PATCH] Retry jest tests to avoid flakes slowing down PRs (#12051) Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- test/setupTests.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/setupTests.ts b/test/setupTests.ts index a7044c0474..f5282231dc 100644 --- a/test/setupTests.ts +++ b/test/setupTests.ts @@ -37,6 +37,11 @@ beforeEach(() => { }); }); +// Retry to work around our flaky app & tests +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 // establish an application state that actually works.