1

I am using CodeceptJs with cucumber helper. For reporting options need to get Scenario name in Before section. Trying to use this documentation: https://codecept.io/bdd/#before So in

Before(() => {
  console.log(Scenario.name)
});

Have nothing in console log.

1 Answers1

0
import { event } from 'codeceptjs';

Before(() => {
  event.dispatcher.on(event.test.before, function (test) {
    console.log(test.title);
  });
});