acuminous / yadda

A BDD javascript library
412 stars 73 forks source link

Fix for Jasmine swallowing errors in steps #225

Closed RadioactiveMouse closed 8 years ago

RadioactiveMouse commented 8 years ago

Jasmine doesn't do anything if we call done(err) so it needs to be notified by done.fail(err) instead.

This problem stops any errors in the javascript from being correctly identified and failing a test.

This is easily reproducible in the jasmine example by throwing an error in any step. Jasmine differs from mocha in that it will ignore if the error is passed back through that callback so we have to be more explicit.

I've tested this in our application and it fixes the issue and errors correctly bubble up and fail the build.

cressie176 commented 8 years ago

Thanks for the PR. I'll review and assuming all well, publish a new version of Yadda tonight.

RadioactiveMouse commented 8 years ago

Awesome, thanks for the prompt response.

Let me know of any issues!

cressie176 commented 8 years ago

Published 0.22.1. Thanks for the PR.