allure-cucumberjs
Version:
Allure Cucumber.JS integration
21 lines (20 loc) • 1.17 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AllureCucumberTestRuntime = void 0;
var _cucumber = require("@cucumber/cucumber");
var _reporter = require("allure-js-commons/sdk/reporter");
var _runtime = require("allure-js-commons/sdk/runtime");
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); }); }; }
class AllureCucumberTestRuntime extends _runtime.MessageTestRuntime {
sendMessage(message) {
return _asyncToGenerator(function* () {
_cucumber.world.attach(JSON.stringify(message), _reporter.ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE);
yield Promise.resolve();
})();
}
}
exports.AllureCucumberTestRuntime = AllureCucumberTestRuntime;
//# sourceMappingURL=runtime.js.map