-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Jest CLI seems to get stuck in an infinite loop running Pact tests #1385
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
We should probably scope the watcher to |
Thanks @gaearon - if there's anything I can do to help fix just point me in the right direction. |
You may be able to download jest's master version from github, run If not, on master it will likely work when using |
As of Jest 18, this doesn’t appear fixed yet. |
Let's fix it by fixing #544. |
I am having this problem today @gaearon. It seems to be broken again. |
Description
I'm trying to use PactJS with Create-React-App to add some contract tests for an API client. The PactJS examples include a Jest example which I copied into my CRA based project.
When I run "npm test" or "yarn test" the tests run and pass/fail as expected, but then they keep running every time they complete. I think this is because the Pact tests generate artefacts (JSON files and log files).
Expected behavior
When I run
npm test
, and pressa
, the tests run once.The tests should run as normal, and not be re-triggered by the generated log files (in the
logs/
directory) or pact json artefacts (in thepacts/
directory) .Actual behavior
Jest interactive mode keeps re-running the tests forever.
Environment
npm ls react-scripts
(if you haven’t ejected):node -v
:v7.4.0
npm -v
:4.0.5
Then, specify:
Reproducible Demo
I have reproduced the issue here: https://github.com/jensraaby/pact-create-react-app-example.
Simply run
npm test
(oryarn test
) and observe the infinite loop beginning. As explained above, I think the problem is to do with the log file or the pact JSON file that is generated by the test.The text was updated successfully, but these errors were encountered: