Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #1385
Closed
Open
Issue created Jan 12, 2017 by Administrator@rootContributor

Jest CLI seems to get stuck in an infinite loop running Pact tests

Created by: jensraaby

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 press a, 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 the pacts/ directory) .

Actual behavior

Jest interactive mode keeps re-running the tests forever.

Environment

  1. npm ls react-scripts (if you haven’t ejected):
pmui@0.0.1 ..../pmui
└── react-scripts@0.8.5
  1. node -v: v7.4.0
  2. npm -v: 4.0.5

Then, specify:

  1. Operating system: Mac OS X 10.9.5
  2. Browser and version: n/a

Reproducible Demo

I have reproduced the issue here: https://github.com/jensraaby/pact-create-react-app-example.

Simply run npm test (or yarn 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.

Assignee
Assign to
Time tracking