From 6dcab53871c7d027dd9779d7571d4dea7e611122 Mon Sep 17 00:00:00 2001 From: jamelreid Date: Tue, 14 Dec 2021 13:14:41 -0500 Subject: [PATCH] Updated jest.retryTimes() to be a conditional This way it doesn't matter if the call is made locally or from the package. --- packages/js/e2e-environment/config/jest-object.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/js/e2e-environment/config/jest-object.config.js b/packages/js/e2e-environment/config/jest-object.config.js index 7ae25d5bebf..e485fc18e2b 100644 --- a/packages/js/e2e-environment/config/jest-object.config.js +++ b/packages/js/e2e-environment/config/jest-object.config.js @@ -6,7 +6,9 @@ const { E2E_RETRY_TIMES } = process.env; const setupJestRetries = ( retries = 0 ) => { const retryTimes = E2E_RETRY_TIMES ? E2E_RETRY_TIMES : retries; - jest.retryTimes( retryTimes ); + if ( retryTimes > 0 ) { + jest.retryTimes( retryTimes ); + } }; // If more methods are added to setupJestObject, it should be include in the readme