If I specify a server and start jest in the watch mode, the server seems to not start at all.
It's reproducable in the create-react-app example. Clone the jest-puppeteer repo, move to examples/create-react-app, install modules and run npm run test:integrationWithWatch. It will fail, although npm run test:integration will work fine.
npm run test:integrationWithWatch should pass
npx envinfo --system --binaries --npmPackages expect-puppeteer,jest-dev-server,jest-environment-puppeteer,jest-puppeteer,spawnd --markdown --clipboardPaste the results here:
## System:
- OS: macOS Mojave 10.14
- CPU: (4) x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
- Memory: 1.08 GB / 16.00 GB
- Shell: 3.2.57 - /bin/bash
## Binaries:
- Node: 8.12.0 - /usr/local/bin/node
- Yarn: 1.13.0 - /usr/local/bin/yarn
- npm: 6.4.1 - /usr/local/bin/npm
- Watchman: 4.9.0 - /usr/local/bin/watchman
## npmPackages:
- jest-puppeteer: ^3.7.0 => 3.9.1
Hello @edoroshenko, thanks for the report, right now I don't have time to investigate it. @xiaoyuhen maybe?
Ummm, 馃I thought i was fix that before.
Will check this issues again.
Possible solution: I had installed watchman via npm install -g watchman but apparently this installs some garbage old version.
npm r -g watchman brew install watchmanfixed the problem
I'm also seeing this issue, but not with the create-react-app example. It looks like that's because the example references jest-puppeteer 3.7.0, which predates commit cc9bbfa493349cc88273120996e713523cf86714.
I uploaded a minimal testcase at https://github.com/tobyn/jest-no-start-server. yarn test works, but yarn test --watchAll never tries to start the server at all. It just bails out of jest-puppeteer-environment's setup function here https://github.com/smooth-code/jest-puppeteer/blob/cc9bbfa493349cc88273120996e713523cf86714/packages/jest-environment-puppeteer/src/global.js#L23
Everything seems to work if I revert cc9bbfa493349cc88273120996e713523cf86714
@xiaoyuhen maybe there is more, can you double check please?
Sorry to comment on a closed issue @xiaoyuhen @neoziro, but I am seeing this error as well with a similar setup to the demo repo, with the following envinfo:
## System:
- OS: macOS 10.14.5
- CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
- Memory: 76.57 MB / 8.00 GB
- Shell: 5.7.1 - /usr/local/bin/zsh
## Binaries:
- Node: 12.4.0 - /usr/local/bin/node
- Yarn: 1.16.0 - /usr/local/bin/yarn
- npm: 6.9.0 - /usr/local/bin/npm
- Watchman: 4.9.0 - /usr/local/bin/watchman
## npmPackages:
- jest-puppeteer: ^4.2.0 => 4.2.0
I believe this issue needs to be reopened.
Seems like indeed the issue is caused by the commit linked by @tobyn Hopefully it can be fixed soon.
Feel free to submit a PR.
Can start server manually

Most helpful comment
Sorry to comment on a closed issue @xiaoyuhen @neoziro, but I am seeing this error as well with a similar setup to the demo repo, with the following envinfo:
I believe this issue needs to be reopened.