UNPKG

e2ed

Version:

E2E testing framework over Playwright

21 lines (20 loc) 1.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.logRetryResult = void 0; const config_1 = require("../config"); const generalLog_1 = require("../generalLog"); const getDurationWithUnits_1 = require("../getDurationWithUnits"); const getPrintedRetry_1 = require("./getPrintedRetry"); const getPrintedTestsCount_1 = require("./getPrintedTestsCount"); /** * Logs results of retry with `generalLog`. * @internal */ const logRetryResult = ({ failedLength, newLength, retriesState, successfulLength, unbrokenLength, }) => { const { maxRetriesCountInDocker } = (0, config_1.getFullPackConfig)(); const { concurrency, startLastRetryTimeInMs } = retriesState; const printedRetry = (0, getPrintedRetry_1.getPrintedRetry)(maxRetriesCountInDocker); const durationWithUnits = (0, getDurationWithUnits_1.getDurationWithUnits)(Date.now() - startLastRetryTimeInMs); (0, generalLog_1.generalLog)(`Results of ${printedRetry}: ${(0, getPrintedTestsCount_1.getPrintedTestsCount)(newLength)} with concurrency ${concurrency} ran in ${durationWithUnits} (${failedLength} failed, ${successfulLength} successful, ${newLength - unbrokenLength} broken).`); }; exports.logRetryResult = logRetryResult;