Merge pull request #31415 from woocommerce/fix/jest-e2e-retries
Fix jest e2e retries
This commit is contained in:
commit
b478bbb949
|
@ -3,10 +3,12 @@
|
|||
*/
|
||||
const { E2E_RETRY_TIMES } = process.env;
|
||||
|
||||
const setupJestRetries = ( retries = 2 ) => {
|
||||
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
|
||||
|
|
|
@ -40,7 +40,7 @@ async function trashExistingPosts() {
|
|||
// each other's side-effects.
|
||||
beforeAll(async () => {
|
||||
|
||||
setupJestRetries();
|
||||
setupJestRetries( 2 );
|
||||
|
||||
if ( DEFAULT_TIMEOUT_OVERRIDE ) {
|
||||
page.setDefaultNavigationTimeout( DEFAULT_TIMEOUT_OVERRIDE );
|
||||
|
|
Loading…
Reference in New Issue