woocommerce/packages/js/e2e-environment/config/jest-object.config.js

23 lines
452 B
JavaScript
Raw Normal View History

/**
* External Dependencies
*/
const { E2E_RETRY_TIMES } = process.env;
2021-12-10 16:02:21 +00:00
const setupJestRetries = ( retries = 0 ) => {
const retryTimes = E2E_RETRY_TIMES ? E2E_RETRY_TIMES : retries;
if ( retryTimes > 0 ) {
jest.retryTimes( retryTimes );
}
};
2021-12-08 19:03:08 +00:00
// If more methods are added to setupJestObject, it should be include in the readme
const setupJestObject = () => {
setupJestRetries();
};
module.exports = {
setupJestObject,
setupJestRetries,
};