Open Karma-Jasmine debug.html page on startup and automatically refresh it.

/ September 30, 2018/ Javascript, Karma/Jasmine, Unit Tests

(Last Updated On: October 7, 2018)

Sweet sweet Karma…

One of the things I found it more frustrating while learning to use Javascript Test Frameworks pack Karma / Jasmine was that the debug.html file (karma-jasmine-html-reporter) did not open up by default and that it does not refresh it self when the source files changes.

Karma context

So a quick workaround for this is to add a init file in your context and open it up using old plain javascript.



(function (window) {
    if (window.location.pathname === '/context.html') {'/debug.html', 'debugTab');


files: [

That will open automatically the debug view on each context update. No plugins required.

Spread the love

Leave a Reply

Notify of