mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
docs(best-practises): recommend no-floating-promises (#23487)
https://github.com/microsoft/playwright/issues/23339 Signed-off-by: Max Schmitt <max@schmitt.mx> Co-authored-by: Pavel Feldman <pavel.feldman@gmail.com>
This commit is contained in:
parent
8bc26a2b44
commit
aab322f2a1
@ -254,6 +254,10 @@ Setup CI/CD and run your tests frequently. The more often you run your tests the
|
|||||||
|
|
||||||
Use Linux when running your tests on CI as it is cheaper. Developers can use whatever environment when running locally but use linux on CI.
|
Use Linux when running your tests on CI as it is cheaper. Developers can use whatever environment when running locally but use linux on CI.
|
||||||
|
|
||||||
|
### Lint your tests
|
||||||
|
|
||||||
|
Linting the tests helps catching errors early. Use [`@typescript-eslint/no-floating-promises`](https://typescript-eslint.io/rules/no-floating-promises/) [ESLint](https://eslint.org) rule to make sure there are no missing awaits before the asynchronous calls to the Playwright API.
|
||||||
|
|
||||||
#### Use parallelism and sharding
|
#### Use parallelism and sharding
|
||||||
|
|
||||||
Playwright runs tests in [parallel](./test-parallel.md) by default. Tests in a single file are run in order, in the same worker process. If you have many independent tests in a single file, you might want to run them in parallel
|
Playwright runs tests in [parallel](./test-parallel.md) by default. Tests in a single file are run in order, in the same worker process. If you have many independent tests in a single file, you might want to run them in parallel
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user