-
Notifications
You must be signed in to change notification settings - Fork 3
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
yarn test:watch
at the very first run executes test twice
#7
Comments
Thank you for your reporting. Please try simply |
|
Think it's probably when you save it triggered by playwright.config.js testMatch: ".*spec\.ts" |
(vscode corrects me With this config, I see
Changing that to this ran tests.
However, it wasn't really the case as I did more tests. It seems when there are multiple spec.ts files, the initial run gets multiplied by the number of the files. (whether or not you have that testMatch part) Does it happen on your environment? |
Okay, I'll look into it, thank you very much. |
same issue here, tests are launched twice in watch mode. $ yarn test:watch reserv
yarn run v1.22.17
$ playwright-watch exec yarn test reserv
$ playwright test reserv
$ playwright test reserv
Using config at /Users/.../apps/demo-e2e/playwright.config.ts
Using config at /Users/.../apps/demo-e2e/playwright.config.ts
Running 1 test using 1 worker
Running 1 test using 1 worker I can also confirm the issue only happens when there is multiple test files. (In my case 2 test files) |
I happened to me, the first time it launch as many as test file I have in Typescript Reproduction repo: https://github.com/leosuncin/redux-offline-example |
I'm seeing similar issue in a project right now, producing 4 duplicate entries: npx playwright-watch exec echo changed
changed
changed
changed
changed |
Following this PR. I see similar behaviour:
|
Dockerfile
package.json
foo.spec.ts
making sure
yarn test
only runs once for foo.spec.tsyarn test:watch
runs the test twice on the initial runNotice
They are output twice.
💾 HERE, I saved foo.spec.ts to run again
After that, it only runs once on a save.
The text was updated successfully, but these errors were encountered: