This is what is mentioned in the official Javascript Cucumber documentation: Recall that step definitions start with a preposition or an adverb (Given, When, Then, And, But). The problem is that there are no exports for but and and.
Version of "@cucumber/cucumber": ^9.3.0, using ESM.
step.js
import { Given, And } from '@cucumber/cucumber';
Given('I need help', () => {
console.log('Given');
});
And('maybe I get help', () => {
console.log('And');
});
help.feature
Feature: Need help
Scenario: Asking For Help
Given I need help
And maybe I get help
Error
import { Given, And } from '@cucumber/cucumber';
^^^
SyntaxError: The requested module '@cucumber/cucumber' does not provide an export named 'And'
This is what is mentioned in the official Javascript Cucumber documentation:
Recall that step definitions start with a preposition or an adverb (Given, When, Then, And, But).
The problem is that there are no exports forbut
andand
.Version of "@cucumber/cucumber":
^9.3.0
, using ESM.step.js
help.feature
Error