JsUnit and debugging

290 Views Asked by At

I'm trying to use JsUnit for testing. One of my tests failed, and now I want to debug the function I tested (while it's running on the test). What's the easy way to do it? Usually I just use Chrome's debugger/Firefox's Firebug, but I do this on a html where the function is used, and here I need somehow to do it from JsUnit's TestRunner.

1

There are 1 best solutions below

0
Jpnh On

As of today, I am able to debug JsUnit tests by placing a breakpoint in the method under test using the Chrome Debugger. If for some reason the script file with the method under test does not appear in the debugger's list of available scripts, you can write a "debugger;" statement within your method and run the test with the Chrome Debugger open.