joescii / sbt-jasmine-plugin

An SBT plugin for running jasmine tests in your build.
Apache License 2.0
32 stars 6 forks source link

Better stack trace and removed bug created in my last pull request. #3

Closed PhroZenOne closed 10 years ago

PhroZenOne commented 10 years ago

In the last pull request (1.2.1), I removed the code that threw an exception upon test errors. But I misinterpreted how the function works so this means that version 1.2.1 made the runner to continue the tests instead of ending it on failure. I fixed it in this version with a system.exit(1) instead. I think this is a better behavior than outputting a stack trace that only points to the sbt plugin.

I also made some changes to the stack trace as I found some exceptions that was not taken care of properly after my last changes.

joescii commented 10 years ago

Good deal, glad you caught that. I'm looking it over right now. I'm going to look for an alternative to the system.exit(1). That works great until you utilize sbt in interactive mode. That will keep kicking the developer out and interrupt the flow.

joescii commented 10 years ago

I think I've found the "right thing": I put the exception back, but this time it is an sbt TestsFailedException, allowing the behavior to be more consistent.

PhroZenOne commented 10 years ago

Ah, never new that there was a interactive mode. I agree that it seems like the best solution. Thanks for the quick response and I'm sorry for the little to hasty pull request from last time! :)

joescii commented 10 years ago

I'm the same way, bro. Release early and often. :) That's how we find these problems.

joescii commented 10 years ago

Another thing I should point out is to not forget that I cross-compile this for both sbt 0.12.x and 0.13.x. The change you made for the deprecation warning doesn't compile for 0.12, so I had to revert that back too. No big deal. It's all released now as version 1.2.2. Thanks again for helping keep this useful plugin alive and well!