Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get QUnit to print backtrace on exception?

When an exception occurs in my QUnit tests, all it will say is

Died on test #n: message

How do I get it to print a backtrace or some other location information so that I can see where the exception occurred?

like image 664
John Freeman Avatar asked Apr 01 '12 20:04

John Freeman


1 Answers

I don't think it is possible to make QUnit give you a trace of where the error happened. Your code has generated an exception, which QUnit has caught and reported. If you tick the 'notrycatch' checkbox at the top of the QUnit results, your tests will run again, but this time QUnit won't catch the exception. Your browser may then give you more information on what actually happened, but it will depend on what the error was.

like image 116
Charles Anderson Avatar answered Sep 25 '22 18:09

Charles Anderson