@chtsinc/ch-playwright-report
Version:
Custom Playwright Reporter that logs test and execution results to MongoDB
49 lines • 1.13 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TestStatusSummaryUtil = void 0;
class TestStatusSummaryUtil {
constructor() {
this.pass = 0;
this.fail = 0;
this.skip = 0;
this.other = 0;
}
addResult(result) {
switch (result.status) {
case "passed":
this.pass++;
break;
case "failed":
this.fail++;
break;
case "skipped":
this.skip++;
break;
default:
this.other++;
break;
}
}
getSummary() {
return {
passed: this.pass,
failed: this.fail,
skipped: this.skip,
other: this.other,
};
}
getPass() {
return this.pass;
}
getFail() {
return this.fail;
}
getSkip() {
return this.skip;
}
getOther() {
return this.other;
}
}
exports.TestStatusSummaryUtil = TestStatusSummaryUtil;
//# sourceMappingURL=test-status-summary-util.js.map