Starter project to write and debug cucumber-js features in TypeScript language
Starter project to write and debug cucumber-js v6 features in TypeScript language.
!!! this template is intended to work with cucumber-js v6 only. For cucumber-js v7 this template has been migrated in cucumber7-ts-starter !!!
npm install
.npm test
.@debug
@only
npm run only
.@ignore
npm run build
.npm run report
.npm run steps-usage
.first write the Given/When/Then sentence:
Given I push "foo" on "bar"
tag the scenario with @only
run the npm script:
npm run snippets
the script will report the missing step(s): you just need to copy and paste them in the step definitions file:
Given('I push {string} on {string}', async function (string, string2) {
// Write code here that turns the phrase above into concrete actions
return 'pending';
});
./node_modules/.bin/cucumber-js features/**/*.feature --foo=bar
if (this.cliArgs.foo === 'bar') {
// custom code for option --foo=bar
}