Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Watch Crashing on test failure #2263

Closed
patrickml opened this issue Dec 8, 2016 · 4 comments
Closed

[Bug] Watch Crashing on test failure #2263

patrickml opened this issue Dec 8, 2016 · 4 comments

Comments

@patrickml
Copy link

When ever a test fails we are currently getting this error, which does crash jest watch

> [email protected] jest /src
> cross-env $(cat .env) cross-env NODE_ENV=test jest "--watch" "--coverage"
2016-12-08T22:12:57.295316649Z 
JH  console.log api/routes.js:59
    API Server is now running on http://localhost:25000
2016-12-08T22:13:49.379502623Z 
 PASS  api/__tests__/graphql.test.js (6.072s)
  Graphql
    ✓ User fetch (103ms)
    ✓ user created (22ms)
    ✓ user updated (17ms)
    ✓ Agent fetch (12ms)
    ✓ Agent fetch events (41ms)
    ✓ Agent fetch messages (17ms)
    ✓ Agent fetch all (51ms)
    ✓ Agent created (31ms)
    ✓ Agent updated (11ms)
    ✓ Event fetch (14ms)
    ✓ Event fetch all (69ms)
    ✓ Event fetch (10ms)
2016-12-08T22:13:49.686509457Z 
/src/node_modules/jest-matchers/build/index.js:110
        throw error;
        ^
2016-12-08T22:13:50.354421869Z 
Error: expect(received).toEqual(expected)
2016-12-08T22:13:50.354430087Z 
Expected value to equal:
  0
Received:
  1
    at /src/api/__tests__/acl.test.js:104:19
    at /src/node_modules/mongodb/lib/cursor.js:950:7
    at /src/node_modules/mongodb-core/lib/connection/pool.js:455:18
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
2016-12-08T22:13:50.388027687Z 
npm info lifecycle [email protected]~jest: Failed to exec jest script
npm ERR! Linux 4.4.27-moby
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "jest" "--" "--watch" "--coverage"
npm ERR! node v7.1.0
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] jest: `cross-env $(cat .env) cross-env NODE_ENV=test jest "--watch" "--coverage"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] jest script 'cross-env $(cat .env) cross-env NODE_ENV=test jest "--watch" "--coverage"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the console-graphql package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env $(cat .env) cross-env NODE_ENV=test jest "--watch" "--coverage"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs console-graphql
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls console-graphql
npm ERR! There is likely additional logging output above.
2016-12-08T22:13:50.417622855Z 
npm ERR! Please include the following file with any support request:
npm ERR!     /src/npm-debug.log
2016-12-08T22:13:50.426163354Z 
npm info lifecycle [email protected]~test:watch: Failed to exec test:watch script
npm ERR! Linux 4.4.27-moby
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "test:watch"
npm ERR! node v7.1.0
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] test:watch: `npm run jest -- --watch --coverage`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] test:watch script 'npm run jest -- --watch --coverage'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the console-graphql package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run jest -- --watch --coverage
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs console-graphql
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls console-graphql
npm ERR! There is likely additional logging output above.
2016-12-08T22:13:50.473814205Z 
npm ERR! Please include the following file with any support request:
npm ERR!     /src/npm-debug.log
@thymikee
Copy link
Collaborator

thymikee commented Dec 8, 2016

Thanks for reporting! It's already known bug, we discuss it here: #2059

@thymikee thymikee closed this as completed Dec 8, 2016
@patrickml
Copy link
Author

@thymikee is there an known solution?

@thymikee
Copy link
Collaborator

thymikee commented Dec 8, 2016

Unfortunately, it's still an open issue. There are but workarounds, which you can check out in #2059

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants