Starter project to write and debug cucumber-js features in TypeScript language
MIT License
Starter project to write and debug cucumber-js v7 features in TypeScript language
npm install
.npm test
.The last reporter/formatter found on the cucumber-js command-line wins:
--format summary --format @cucumber/pretty-formatter --format cucumber-console-formatter
In package.json file, modify the cucumber
script to keep only your preferred formatter.
@debug
@only
npm run only
.@ignore
npm run build
.npm run steps-usage
.npm run report
.first write the Given/When/Then sentence:
Given I push "foo" on "bar"
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';
});
With cucumber-js v7, you cannot have anymore custom options on the CLI. This is a breaking change with cucumber-js v6.
You must instead use environment variables.
When running your tests localy, you can setup environment variables by customizing the file set-environment-variables.ts.
When running on a CI, you should setup your jobs with the expected environment variables.