Reputation: 1493
I setup jest-puppeteer and it was really easy to make it work, and it is fast enough for what I was looking for.
The issue that I am having is that, at the moment I have two tests and both have the same setup steps (beforeAll). I tried to add a setup step before all tests and I was not able to.
But even without that, I just tried to use the current browser global and retrieve the first puppeteer page but that did not work either. I also noticed that it tries to run both tests in parallel opening two tabs at once, which always make one of the tests fail.
Tried to check the docs examples and I could not find anything similar, and I have no idea where to go from here.
Any ideas how to solve that?
Upvotes: 0
Views: 440
Reputation: 46
I believe you want to use the CLI option --runInBand
According to the Jest CLI (https://jestjs.io/docs/cli) documentation:
--runInBand
Alias: -i. Run all tests serially in the current process, rather than creating a worker pool of child processes that run tests. This can be useful for debugging.
Upvotes: 1