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

Jest tests pass but output is directed to stdErr #4384

Closed
oberoi-ishant opened this issue Aug 29, 2017 · 4 comments
Closed

Jest tests pass but output is directed to stdErr #4384

oberoi-ishant opened this issue Aug 29, 2017 · 4 comments

Comments

@oberoi-ishant
Copy link

oberoi-ishant commented Aug 29, 2017

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?

@oberoi-ishant oberoi-ishant changed the title Jest tests pass but return Error in Maven Output Jest tests pass but output is directed to stdErr Aug 29, 2017
@cpojer
Copy link
Member

cpojer commented Aug 29, 2017

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

@cpojer
Copy link
Member

cpojer commented Aug 29, 2017

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.

@JohnWeisz
Copy link

JohnWeisz commented Sep 11, 2018

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

@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 12, 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

3 participants