question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

failing tests returns code 0

See original GitHub issue

When tests are failing I’d like to get exit code 1 from it. Right now it returns 0 even if tests are failing, so for example my pre-push hook doesn’t prevent pushing with broken tests.

Software version

├── @quasar/quasar-app-extension-testing@1.0.0
├── @quasar/quasar-app-extension-testing-e2e-cypress@1.0.0-beta.11
├── @quasar/quasar-app-extension-testing-unit-jest@1.0.1
├── @vue/test-utils@1.0.3
├── jest@26.1.0
├── quasar@1.12.3
└── vue-jest@3.0.6

OS: macOS Node: 12.10.0 NPM: 6.14.4 Any other software related to your bug:

What did you get as the error?

exit code: 0

What were you expecting?

exit code: 1

What steps did you take, to get the error?

$ quasar test --unit jest
...
Test Suites: 1 failed, 1 passed, 2 total
Tests:       1 failed, 6 passed, 7 total
Snapshots:   0 total
Time:        4.101 s
Ran all test suites.
$ echo $?
0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
IlCallocommented, Nov 17, 2020

Check out v1.0.3 for the fix 😃

1reaction
IlCallocommented, Nov 12, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

run-ct returns with exit code 0 when tests fail - breaking CI ...
Current behavior This is a pretty big bug. All CI jobs running with run-ct will report success even if tests fail due to...
Read more >
Getting Exit Code = 0 when one test failed - Katalon Community
I have a test that has been failing for some time already, starting today, it still fails, yet exit code is 0 instead...
Read more >
Pytest returns status code 0 even when tests fail - Stack Overflow
The output help explains on first page how to evaluate the exit code of a command or executable by using the syntax if...
Read more >
Exit codes — pytest documentation
Running pytest can result in six different exit codes: Exit code 0. All tests ... Tests were collected and run but some of...
Read more >
Test Result Codes - eLinux.org
Exit code 0: All tests were collected and passed successfully; Exit code 1: Tests were collected and run but some of the tests...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found