Skip to content

Commit

Permalink
Merge pull request #147 from wouterkroes/main
Browse files Browse the repository at this point in the history
wrap nodemon --exec value in double quotes for watch:bdd task
  • Loading branch information
vitalets authored May 6, 2024
2 parents faec348 + 69e1668 commit 25259a9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/guides/watch-mode.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Watch mode
To watch feature / steps files and automatically regenerate tests you can use [nodemon](https://github.com/remy/nodemon):
```
npx nodemon -w ./features -w ./steps -e feature,js,ts --exec 'npx bddgen'
npx nodemon -w ./features -w ./steps -e feature,js,ts --exec "npx bddgen"
```

To automatically rerun tests after changes you can run the above command together with [Playwright `--ui` mode](https://playwright.dev/docs/test-ui-mode), utilizing [npm-run-all](https://github.com/mysticatea/npm-run-all). Example `package.json`:

```json
"scripts": {
"watch:bdd": "nodemon -w ./features -w ./steps -e feature,js,ts --exec 'npx bddgen'",
"watch:bdd": "nodemon -w ./features -w ./steps -e feature,js,ts --exec \"npx bddgen\"",
"watch:pw": "playwright test --ui",
"watch": "run-p watch:*"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"scripts": {
"test": "npx bddgen && npx playwright test",
"watch:bdd": "nodemon -w ./features -w ./steps -e feature,js,ts --exec 'npx bddgen'",
"watch:bdd": "nodemon -w ./features -w ./steps -e feature,js,ts --exec \"npx bddgen\"",
"watch:pw": "playwright test --ui",
"watch": "run-p watch:*"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/decorators/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"scripts": {
"test": "npx bddgen && npx playwright test",
"watch:bdd": "nodemon -w ./features -w ./steps -e feature,js,ts --exec 'npx bddgen'",
"watch:bdd": "nodemon -w ./features -w ./steps -e feature,js,ts --exec \"npx bddgen\"",
"watch:pw": "playwright test --ui",
"watch": "run-p watch:*"
}
Expand Down

0 comments on commit 25259a9

Please sign in to comment.