Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract common options to cucumber.js #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,16 @@
"stopOnEntry": false,
"program": "${workspaceRoot}/node_modules/@cucumber/cucumber/bin/cucumber-js",
"args": [
"features/**/*.feature",
"--require",
"env/set-environment-variables.ts",
"--require",
"world/custom-world.ts",
"--require",
"step-definitions/**/*.ts",
"--require",
"hooks/**/*.ts",
"--require-module",
"ts-node/register",
"--format-options" ,
"{\"snippetInterface\": \"async-await\"}",
"--format",
"summary",
"--tags",
"@debug",
"--publish-quiet"
],
"cwd": "${workspaceRoot}",
"runtimeArgs": [
"--nolazy"],
"sourceMaps": true
"--nolazy"
],
"sourceMaps": true
}
]
}
4 changes: 4 additions & 0 deletions cucumber.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
default:
'features/**/*.feature --require env/set-environment-variables.ts --require world/custom-world.ts --require step-definitions/**/*.ts --require hooks/**/*.ts --require-module ts-node/register --format-options \'{"snippetInterface": "async-await"}\' --publish-quiet',
};
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
"main": "index.js",
"scripts": {
"build": "rimraf build && npm run format && npm run lint && tsc && npm run cucumber-check",
"cucumber-check": "node ./node_modules/@cucumber/cucumber/bin/cucumber-js features/**/*.feature --dry-run --require env/set-environment-variables.ts --require world/custom-world.ts --require step-definitions/**/*.ts --require hooks/**/*.ts --require-module ts-node/register --format-options \"{\\\"snippetInterface\\\": \\\"async-await\\\"}\" --format summary --format progress --format progress-bar --publish-quiet",
"cucumber": "node ./node_modules/@cucumber/cucumber/bin/cucumber-js features/**/*.feature --require env/set-environment-variables.ts --require world/custom-world.ts --require step-definitions/**/*.ts --require hooks/**/*.ts --require-module ts-node/register --format-options \"{\\\"snippetInterface\\\": \\\"async-await\\\"}\" --format html:reports/report.html --format summary --format @cucumber/pretty-formatter --format cucumber-console-formatter --publish-quiet",
"cucumber-check": "npx cucumber-js --dry-run --format summary --format progress --format progress-bar",
"cucumber": "npx cucumber-js --format html:reports/report.html --format summary --format @cucumber/pretty-formatter --format cucumber-console-formatter",
"eslint-fix": "eslint ./ --ext .js,.ts,.tsx --fix",
"eslint-init": "eslint --init",
"format": "prettier --write \"**/*.{ts,tsx,css,html}\" ",
"lint": "eslint ./ --ext .js,.ts,.tsx --format visualstudio --no-color --max-warnings 10 --report-unused-disable-directives",
"only": "npm run cucumber -- --tags @only",
"report": "open reports/report.html",
"snippets": "node ./node_modules/@cucumber/cucumber/bin/cucumber-js features/**/*.feature --dry-run --require env/set-environment-variables.ts --require world/custom-world.ts --require step-definitions/**/*.ts --require hooks/**/*.ts --require-module ts-node/register --format-options \"{\\\"snippetInterface\\\": \\\"async-await\\\"}\" --format snippets --publish-quiet",
"steps-usage": "node ./node_modules/@cucumber/cucumber/bin/cucumber-js features/**/*.feature --dry-run --require env/set-environment-variables.ts --require world/custom-world.ts --require step-definitions/**/*.ts --require hooks/**/*.ts --require-module ts-node/register --format-options \"{\\\"snippetInterface\\\": \\\"async-await\\\"}\" --format usage --publish-quiet",
"snippets": "npx cucumber-js --dry-run --format snippets",
"steps-usage": "npx cucumber-js --dry-run --format usage",
"test": "npm run cucumber"
},
"engines": {
Expand Down