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 instructions cause CI to pass on failed tests #230

Closed
mlms13 opened this issue Jul 12, 2019 · 1 comment
Closed

Jest instructions cause CI to pass on failed tests #230

mlms13 opened this issue Jul 12, 2019 · 1 comment

Comments

@mlms13
Copy link

mlms13 commented Jul 12, 2019

The README provides these instructions for Jest integration:

jest --coverage --coverageReporters=text-lcov | coveralls

But in this case, if a test doesn't pass, Jest's non-zero exit status is swallowed by | coveralls and turned into a 0, which tricks Circle (and probably most other CIs?) into thinking the build was a success.

The command suggested in this comment shouldn't have the same issue:

jest --coverage && cat ./coverage/lcov.info | coveralls
@mlms13 mlms13 changed the title Jest instructions case CI to pass on failed tests Jest instructions cause CI to pass on failed tests Jul 12, 2019
@AndreMiras
Copy link
Contributor

Yes I confirm I get the issue with Travis too. Another way to make the pipe file would be to set -o pipefail.

AndreMiras added a commit to AndreMiras/mysodexo.js that referenced this issue Dec 7, 2019
Piping to `coveralls` made the CI not failing properly, refs:
nickmerwin/node-coveralls#230
AndreMiras added a commit to AndreMiras/mysodexo.js that referenced this issue Dec 7, 2019
Piping to `coveralls` made the CI not failing properly, refs:
nickmerwin/node-coveralls#230
AndreMiras added a commit to AndreMiras/node-coveralls that referenced this issue Dec 7, 2019
Addresses only the `jest` case, other cases can be handled via
subsequent pull requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants