From 69e16683aad7ce4001e6d47988a120f7cd9588e7 Mon Sep 17 00:00:00 2001 From: Wouter Kroes Date: Fri, 26 Apr 2024 14:17:18 +0200 Subject: [PATCH] chore: wrap nodemon --exec value in double quotes for watch:bdd task --- docs/guides/watch-mode.md | 4 ++-- examples/basic/package.json | 2 +- examples/decorators/package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/guides/watch-mode.md b/docs/guides/watch-mode.md index add8fce2..c9892ad9 100644 --- a/docs/guides/watch-mode.md +++ b/docs/guides/watch-mode.md @@ -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:*" } diff --git a/examples/basic/package.json b/examples/basic/package.json index 8c82a4fd..f1d694c7 100644 --- a/examples/basic/package.json +++ b/examples/basic/package.json @@ -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:*" } diff --git a/examples/decorators/package.json b/examples/decorators/package.json index 8c82a4fd..f1d694c7 100644 --- a/examples/decorators/package.json +++ b/examples/decorators/package.json @@ -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:*" }