Jest: Jest tests pass but output is directed to stdErr

Created on 29 Aug 2017  Â·  3Comments  Â·  Source: facebook/jest

Even thought all the JEST tests pass, they are logged as [ERROR] in mvn output.
Jest is passing all output to Stderr

[ERROR]  PASS  tests/spec/MyComponent.spec.js (9.744s)
[ERROR]
[ERROR] Snapshot Summary
[ERROR]  › 2 snapshots written in 1 test suite.
[ERROR]
[ERROR] Test Suites: 5 skipped, 3 passed, 3 of 8 total
[ERROR] Tests:       10 skipped, 6 passed, 16 total
[ERROR] Snapshots:   2 added, 2 total
[ERROR] Time:        20.315s
[ERROR] Ran all test suites.

Any idea?

All 3 comments

Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions. Thank you :)

It's possible that this is because Jest may choose to print to stderr, rather than stdout (when --json is given for example). You may be able to re-route where the test output is written to.

@cpojer Jest is using stderr by default, even without --json or --useStderr

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kentor picture kentor  Â·  3Comments

samzhang111 picture samzhang111  Â·  3Comments

gustavjf picture gustavjf  Â·  3Comments

StephanBijzitter picture StephanBijzitter  Â·  3Comments

ticky picture ticky  Â·  3Comments