Reputation: 644
I use Cucumber 3.x and I want get scenario name in Before hook. My code seems like this:
Before(function (scenario) {
let name = scenario.name;
console.log(scenario) //debug printing
return require("./driver").createDriver(desired);
});
And console.log in Cucumber 3.x shows only this:
{ sourceLocation:
{ uri: 'name_my_feature.feature',
line: 206 } } //206 - is line current scenario name
How I can get scenario name?
Upvotes: 1
Views: 2070