Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Karma-junit-reporter 0.4.0 - build fails on UNIX system #86

Closed
urbanq opened this issue Mar 10, 2016 · 4 comments
Closed

Karma-junit-reporter 0.4.0 - build fails on UNIX system #86

urbanq opened this issue Mar 10, 2016 · 4 comments

Comments

@urbanq
Copy link

urbanq commented Mar 10, 2016

0.3.8 pass correctly.
problem:
14:37:48 [ERROR] Missing error handler on socket.
14:37:48 [ERROR] TypeError: Cannot read property 'charAt' of undefined
14:37:48 [ERROR] at posix (/opt/home/jenkins/workspace/APP/node_modules/karma-junit-reporter/node_modules/path-is-absolute/index.js:4:13)
14:37:48 [ERROR] at writeXmlForBrowser (/opt/home/jenkins/workspace/APP/node_modules/karma-junit-reporter/index.js:61:9)
14:37:48 [ERROR] at onBrowserComplete (/opt/home/jenkins/workspace/APP/node_modules/karma-junit-reporter/index.js:126:5)
14:37:48 [ERROR] at null. (/opt/home/jenkins/workspace/APP/node_modules/karma/lib/events.js:13:22)
14:37:48 [ERROR] at emitTwo (events.js:92:20)
14:37:48 [ERROR] at emit (events.js:172:7)
14:37:48 [ERROR] at onComplete (/opt/home/jenkins/workspace/APP/node_modules/karma/lib/browser.js:142:13)
14:37:48 [ERROR] at Socket. (/opt/home/jenkins/workspace/APP/node_modules/karma/lib/events.js:13:22)
14:37:48 [ERROR] at emitTwo (events.js:92:20)
14:37:48 [ERROR] at Socket.emit (events.js:172:7)
14:37:48 [ERROR] at Socket.onevent (/opt/home/jenkins/workspace/APP/node_modules/karma/node_modules/socket.io/lib/socket.js:335:8)
14:37:48 [ERROR] at Socket.onpacket (/opt/home/jenkins/workspace/APP/node_modules/karma/node_modules/socket.io/lib/socket.js:295:12)
14:37:48 [ERROR] at Client.ondecoded (/opt/home/jenkins/workspace/APP/node_modules/karma/node_modules/socket.io/lib/client.js:193:14)
14:37:48 [ERROR] at Decoder.Emitter.emit (/opt/home/jenkins/workspace/APP/node_modules/karma/node_modules/socket.io/node_modules/socket.io-parser/node_modules

configuration like:
junitReporter: {
outputDir: '../target/surefire-reports', // results will be saved as $outputDir/$browserName.xml
outputFile: undefined, // if included, results will be saved as $outputDir/$browserName/$outputFile
suite: '', // suite will become the package name attribute in xml testsuite element
useBrowserName: true, // add browser name to report and classes names
nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
classNameFormatter: undefined // function (browser, result) to customize the classname attribute in xml testcase element
},

writeXmlForBrowser should validate/handle outputFile before calling pathIsAbsolute.

@cloakedninjas
Copy link

Duplicates #87

@jpaulin
Copy link
Contributor

jpaulin commented Jun 7, 2016

@urbanq Since the issue #87 is now closed with modifications done to fix it, is this issue fixed too?
There is now a:

if outputFile && ...
[line 69; index.js]
clause in the code, that checks basically existence of the outputFile variable (coming from config to karma-junit-reporter)

@stramel
Copy link

stramel commented Jul 22, 2016

karma-runner/karma#1292

@wesleycho
Copy link
Member

Closing as a duplicate/resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants