UNPKG

prettier-playwright-msteams-report

Version:
33 lines (32 loc) 878 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getTotalStatus = void 0; const getTotalStatus = (suites) => { let total = { passed: 0, flaky: 0, failed: 0, skipped: 0, }; for (const suite of suites) { const testOutcome = suite.allTests().map((test) => { return test.outcome(); }); for (const outcome of testOutcome) { if (outcome === "expected") { total.passed++; } else if (outcome === "flaky") { total.flaky++; } else if (outcome === "unexpected") { total.failed++; } else if (outcome === "skipped") { total.skipped++; } } } return total; }; exports.getTotalStatus = getTotalStatus;