jest-allure2-adapter
Version:
Allure 2 Adapter for jest
29 lines (28 loc) • 766 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.JasmineAllureReporter = void 0;
const path_1 = require("path");
class JasmineAllureReporter {
constructor(allure) {
this.allure = allure;
}
suiteStarted(suite) {
if (suite) {
this.allure.startGroup(suite.description);
}
else {
// case for tests without suite
this.allure.startGroup(path_1.relative(process.cwd(), expect.getState().testPath));
}
}
suiteDone() {
this.allure.endGroup();
}
specStarted(spec) {
this.allure.startTest(spec);
}
specDone(spec) {
this.allure.endTest(spec);
}
}
exports.JasmineAllureReporter = JasmineAllureReporter;