Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

no stack trace for jasmine-node errors

I'm using node.js and the jasmine-node npm module to run tests. This works perfectly except if the code produces an error. I get no stacktrace. For example, one of my tests only outputs this:

Error: TypeError: Cannot read property 'length' of undefined

No stack trace. This makes finding these errors so time-consuming that I'm looking for alternatives to jasmine-node.

How can I get jasmine-node to output the full stack trace with the error? The --verbose command-line flag doesn't do it.

like image 704
Jake Avatar asked Jan 09 '12 19:01

Jake


1 Answers

You can use jasmine-node's --captureExceptions option to output the stack trace of global exceptions.

like image 164
naddison Avatar answered Nov 09 '22 05:11

naddison