e2ed
Version:
E2E testing framework over Playwright
21 lines (20 loc) • 1.06 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.logEndTestRunEvent = void 0;
const internal_1 = require("../../constants/internal");
const completedTestRuns_1 = require("../completedTestRuns");
const generalLog_1 = require("../generalLog");
/**
* Logs an end of test run event.
* @internal
*/
const logEndTestRunEvent = async (fullTestRun) => {
const { filePath, mainParams, name, options, runError, runId, status } = fullTestRun;
const messageBackgroundColor = internal_1.MESSAGE_BACKGROUND_COLOR_BY_STATUS[status];
const messageSymbol = internal_1.TEST_RUN_STATUS_SYMBOLS[status];
const messageText = `${messageSymbol} ${status} ${mainParams} ${name}`;
const message = (0, generalLog_1.getMessageWithBackgroundColor)(messageText, messageBackgroundColor);
const successful = (await (0, completedTestRuns_1.getSuccessfulTestFilePaths)()).length;
(0, generalLog_1.generalLog)(message, { filePath, options, runError, runId, successful });
};
exports.logEndTestRunEvent = logEndTestRunEvent;