juliemr / minijasminenode

A very bare-bones version of jasmine-node
MIT License
32 stars 21 forks source link

Catch loading errors in specs, including syntax errors, and report them as failures during test execution #5

Closed alanmyrvold closed 10 years ago

alanmyrvold commented 10 years ago

Currently errors when loading specs, including javascript syntax errors, result in passing tests in the test runner, which isn't ideal.

There is a try/catch in lib/index.js, so assuming you want other specs to run when some specs have errors in loading?

In this change I create a new describe/it to represent the failure when loading the spec.

An alternative change would be to remove the try/catch or re-throw the exception.

juliemr commented 10 years ago

Thanks for the fix! I merged the two commits together and submitted as 40de2849a6601ee387096b5d0667da3790d04911