UNPKG

@serenity-js/cucumber

Version:

Serenity/JS test runner adapter for seamless integration with any version of Cucumber.js, facilitating BDD-style test automation and leveraging Serenity/JS reporting capabilities

26 lines 1.03 kB
"use strict"; const model_1 = require("@serenity-js/core/lib/model"); const CucumberEventProtocolAdapter_1 = require("./CucumberEventProtocolAdapter"); module.exports = function (dependencies) { const { BeforeAll, After, AfterAll } = dependencies.cucumber; BeforeAll(function () { dependencies.notifier.testRunStarts(); }); After(function () { dependencies.notifier.scenarioFinishes(); return dependencies.serenity.waitForNextCue(); }); AfterAll(async function () { dependencies.notifier.testRunFinishes(); try { await dependencies.serenity.waitForNextCue(); dependencies.notifier.testRunFinished(new model_1.ExecutionSuccessful()); } catch (error) { dependencies.notifier.testRunFinished(new model_1.ExecutionFailedWithError(error)); throw error; } }); return (0, CucumberEventProtocolAdapter_1.cucumberEventProtocolAdapter)(dependencies); }; //# sourceMappingURL=cucumber-4.js.map