UNPKG

protractor-smartrunner

Version:

Protractor utility for keeping track of passed/failed tests between runs. Works together with protractor-retry.

32 lines (31 loc) 954 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SmartRunnerReporter = void 0; class SmartRunnerReporter { constructor(results) { this.results = results; this.startTime = new Date(); } jasmineStarted(suiteInfo) { this.startTime = new Date(); } suiteStarted(result) { } specStarted(result) { this.startTime = new Date(); } specDone(result) { const duration = new Date().getTime() - this.startTime.getTime(); const specName = result.description; const suiteName = result.fullName.replace(specName, '').trim(); if (result.status !== 'disabled') { this.results.set(suiteName, specName, result.status === 'passed' || result.status === 'pending', duration); } } suiteDone(result) { } jasmineDone() { this.results.save(); } } exports.SmartRunnerReporter = SmartRunnerReporter;