Karma-grunt test case failure with PhantomJS

115 Views Asked by At

I am running a test suite which uses karma to test a few capabilities of PhantomJS on Ubuntu 15.04. The test case takes a few JavaScript files, creates a bundle, and invokes PhantomJS to serve these scripts. I could trace the execution till the bundle is uploaded. However after that I get "PhantomJS crashed" error. Apparently, there a no log files generated (or I couldn't locate them). Since I am not quite an expert in all this, I would like to know how I can debug this problem. Is there any way I can see what is going on with the PhantomJS?

1

There are 1 best solutions below

0
On

You need to register event listener for messages being printed for any standard output to redirect to console.

 page.onConsoleMessage = function (message) {
    system.std.err.writeLine(message);
    };