allure-jest
Version:
Allure Jest integration
19 lines • 1.05 kB
JavaScript
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
import { MessageTestRuntime } from "allure-js-commons/sdk/runtime";
export class AllureJestTestRuntime extends MessageTestRuntime {
constructor(jestEnvironment, context) {
super();
this.jestEnvironment = jestEnvironment;
this.context = context;
context.allureTestRuntime = () => this;
}
sendMessage(message) {
var _this = this;
return _asyncToGenerator(function* () {
_this.jestEnvironment.handleAllureRuntimeMessage(message);
yield Promise.resolve();
})();
}
}
//# sourceMappingURL=AllureJestTestRuntime.js.map