jasmine-fail-fast icon indicating copy to clipboard operation
jasmine-fail-fast copied to clipboard

Library swallows exceptions thrown in afterAll

Open elsbrock opened this issue 6 years ago • 1 comments

In case of an error during afterAll (probably also beforeAll) this reporter silently swallows the error while jasmine's exit code still is != 0. It manifests as follows, e.g.:

SUCCESS: 1 specs, 0 failures, 0 skipped, 0 disabled in 0.225s.
Warning: Task "jasmine_nodejs:unit_ci" failed. Use --force to continue.

In this case there was an error during an afterAll and no tests where executed. I understand there may be no spec to be marked as failed; however, other reporters still display the reason of the error at the end of the test output, e.g.:

Summary:

Suites:  136 of 136
Specs:   1 of 531 (530 disabled)
Expects: 0 (0 failures)
Finished in 0.314 seconds


>> An error was thrown in an afterAll
   Error: eee
     at handleError /Users/d049680/Code/bdh-objectservices/backend/test/jasmine/helpers/beforeTestHelper.js:176:11
     at runCallback timers.js:637:20
     at tryOnImmediate timers.js:610:5
     at processImmediate [as _immediateCallback] timers.js:582:5

Since there hasn't been upstream activity for quite some time I don't expect this to be fixed and instead just wanted to give a heads up to others running into this problem.

elsbrock avatar Aug 31 '17 12:08 elsbrock

Thanks for the report @else!

pmowrer avatar Sep 28 '17 22:09 pmowrer