Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

neutrino test always exits with 0 #632

Closed
okonet opened this issue Dec 18, 2017 · 5 comments
Closed

neutrino test always exits with 0 #632

okonet opened this issue Dec 18, 2017 · 5 comments
Labels

Comments

@okonet
Copy link
Contributor

okonet commented Dec 18, 2017

When using Jest preset, even if my test suit fails the exit code is always 0 which causes CI to always pass.

neutrino version 7.2.1+ (also tested on 7.4.0)

It works as expected on v6.2.0

@okonet
Copy link
Contributor Author

okonet commented Dec 18, 2017

Also the coverage report is gone between v6 and v7

@okonet
Copy link
Contributor Author

okonet commented Dec 19, 2017

Looks like 3d7ea84 broke it since Jest runCLI returns a promise...

@eliperelman
Copy link
Member

Trying to dig into the Jest changelog, but nowhere did it mention this breaking change. I found the part of the commit that broke this:

https://github.com/facebook/jest/pull/3862/files#diff-281a28872bb5a78b747f7cd3d114a0edR47

Unfortunately the commit message is only "Refactor CLI", and didn't mention at all how the API had changed here, so this was missed. Apologies.

@okonet
Copy link
Contributor Author

okonet commented Dec 19, 2017

Oh wow! Nothing to apologize. Let's try to cover this with tests to prevent in the future

@eliperelman
Copy link
Member

Just to address the issue title: the neutrino test command always exits with a 0 code unless a Promise gets rejected, like with a test runner, in which case it should exit with 1.

https://github.com/mozilla-neutrino/neutrino-dev/blob/abdcbeb20098531a74a6d39198e878de29309e8d/packages/neutrino/bin/test.js#L10-L14

https://github.com/mozilla-neutrino/neutrino-dev/blob/abdcbeb20098531a74a6d39198e878de29309e8d/packages/neutrino/bin/base.js#L78

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants