UNPKG

e2ed

Version:

E2E testing framework over Playwright

19 lines (18 loc) 695 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getConcurrencyForNextRetry = void 0; /** * Get concurrency for next tests-run retry by current concurrency, * noSuccessfulTestsInLastRetry flag and tests count. * @internal */ const getConcurrencyForNextRetry = ({ currentConcurrency, noSuccessfulTestsInLastRetry, testsCount, }) => { const newBaseConcurrency = noSuccessfulTestsInLastRetry ? Math.ceil(currentConcurrency / 2) : currentConcurrency; if (testsCount > 0) { return Math.min(newBaseConcurrency, testsCount); } return newBaseConcurrency; }; exports.getConcurrencyForNextRetry = getConcurrencyForNextRetry;