Skip to content

Commit

Permalink
docs: know issue separate browser for each file (#72)
Browse files Browse the repository at this point in the history
* docs: know issue: separate browser for each file

* Update README.md
  • Loading branch information
mxschmitt committed Mar 16, 2020
1 parent 023c318 commit 416bbd6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ jest.setTimeout(35 * 1000);

in your tests at the top. (30 seconds is the default Playwright timeout for waiting for an specific element.)

### New Browser instance for each test

If for your individual tests a new entire browser instance spins up each time and it won't be reused, then you probably run them in parallel. If you run them in a synchronous way with the `--runInBand` CLI option for Jest, then the same browser instance will be re-used and this should fix the issue.

## Inspiration

Thanks to [Smooth Code](https://github.com/smooth-code) for great [jest-puppeteer](https://github.com/smooth-code/jest-puppeteer).
Expand Down

0 comments on commit 416bbd6

Please sign in to comment.