I am trying to figure out the best way to debug my unit tests when I break them. Typically in previous test environments I could just run the tests in the browser and breakpoint the test, or the code and see why my test was failing. I can't seem to figure out how to do that with testacular. Is there an easy way to debug unit tests?
In karma.conf.js
:
browsers = ['Chrome'];
In your failing spec:
it('spec', function() {
debugger; // This is like setting a breakpoint
// ...
});
Now in Chrome's Developer Tools source tab you should see the execution stopped at the debugger.