axe-playwright-report
Version:
Playwright + axe-core integration to run accessibility scans and build HTML dashboard reports.
23 lines (22 loc) • 665 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const buildReport_1 = require("./buildReport");
class AxeReporter {
constructor(config) {
this.softAssert = config === null || config === void 0 ? void 0 : config.softAssert;
}
onBegin() {
(0, buildReport_1.cleanUp)();
}
onEnd() {
if (this.softAssert === undefined)
(0, buildReport_1.main)();
else {
(0, buildReport_1.main)();
const isFailed = (0, buildReport_1.test)(this.softAssert, true);
if (isFailed)
process.exit(1);
}
}
}
exports.default = AxeReporter;