🙈🐵 Run Playwright in watch mode
npm install playwright-watch
playwright
+
watch
=
playwright-watch
🙈🐵 Run Playwright in watch mode
use exactly the same as Playwright, only in watch mode
``bash`
npx playwright-watch test
> Note: There is a peer dependency on playwright.
`bash
yarn add playwright-watch -D
#or
npm install playwright-watch --save-dev
`
Add script to your package.json
`json`
{
"test:watch": "playwright-watch test"
}
or
`json`
{
"test": "playwright test",
"test:watch": "playwright-watch exec yarn test"
}
run npx playwright-watch --help to see more details.
`bash
🙈 playwright-watch
🐵 Run Playwright in watch mode
Commands:
playwright-watch
(e.g. playwright-watch test) [default]
playwright-watch exec
(e.g. playwright-watch exec yarn test)
Options:
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
-c, --config Configuration file of Playwright (default:
playwright.config.js), the testMatch prop will be watch path.*(test|spec).(js|ts|mjs)
(default: ).
Examples:
playwright-watch test
playwright-watch test --config tests/playwright.config.js
playwright-watch exec yarn playwright test
playwright-watch exec yarn run test:e2e
playwright-watch exec echo changed
``