I see the following error when executing my angular2 unit tests using karma with jenkins.
My tests run fine when I run them on my local machine (windows), however when I run the test through jenkins on linux I get the following error.
Missing error handler on `socket`. TypeError: (msg || "").replace is not a function at /home/hudson/.hudson/jobs/workspace/pjt/node_modules/karma/lib/reporter.js:45:23
In my tests, no ideas have ever started that could cause this. I looked at the source code of karma, and I could not understand why the problem arose.
return function (msg, indentation) { // remove domain and timestamp from source files // and resolve base path / absolute path urls into absolute path msg = (msg || '').replace(URL_REGEXP, function (_, prefix, path, __, ___, line, ____, column) { if (prefix === 'base') { path = basePath + path } // more code here ...
I use PhantomJS as a test runner just in case, both in local and in jenkins.
I would appreciate it to be a problem.
angular karma-runner karma-jasmine
Paul whelan
source share