UNPKG

cypress-terminal-report

Version:

Better terminal and file output for cypress test logs.

21 lines (20 loc) 786 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const constants_1 = __importDefault(require("../constants")); const LogCollectBase_1 = __importDefault(require("./LogCollectBase")); class LogCollectCypressLog extends LogCollectBase_1.default { register() { Cypress.Commands.overwrite('log', (subject, ...args) => { this.collectorState.addLog([ constants_1.default.LOG_TYPES.CYPRESS_LOG, args.join(' '), constants_1.default.SEVERITY.SUCCESS, ]); subject(...args); }); } } exports.default = LogCollectCypressLog;