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

xunit reporter should use process.stdout.write instead of console.log #1068

Merged
merged 1 commit into from
Dec 12, 2013
Merged

xunit reporter should use process.stdout.write instead of console.log #1068

merged 1 commit into from
Dec 12, 2013

Conversation

nathanboktae
Copy link
Contributor

Simple change that fixes nathanboktae/mocha-phantomjs#114 and makes it more consistent with other formatters that should not have formatting like json.

travisjeffery pushed a commit that referenced this pull request Dec 12, 2013
xunit reporter should use process.stdout.write instead of console.log
@travisjeffery travisjeffery merged commit c0bcf71 into mochajs:master Dec 12, 2013
@nathanboktae nathanboktae deleted the xunit-stdout branch December 13, 2013 18:26
@Alexey-Malutin
Copy link

This breaks work mocha in browser.

@nathanboktae
Copy link
Contributor Author

What's the use case to run xunit in the browser without some way to dump the results to a file like mocha-phantomjs is doing?

@Alexey-Malutin
Copy link

We want to run tests using both selenium and real browser. Due to the need of working inside browser we can not use mocha-selenium. We have some workaround to dump xunit report through selenium. But really, xunit and test runs in browser.

@tj
Copy link
Contributor

tj commented Dec 24, 2013

now it doesn't have newlines either

@nathanboktae
Copy link
Contributor Author

OK since all the tests passed, I assumed it wasn't a requirement for it to run in outside of Node.js. Tests for those reporters needing to run in the browser would help.

jeffparsons added a commit to jeffparsons/mocha that referenced this pull request Jan 6, 2014
Falls back to `console.log` if `process.stdout` is unavailable.

Fixes mochajs#1068.

(This also seems to have picked up a completely unrelated change to another
file that hadn't yet made it into the mocha.js snapshot.)
jonnyreeves added a commit to jonnyreeves/mocha that referenced this pull request Dec 14, 2015
Fixes mochajs#1674; provides support *much* needed for [mocha-phantomjs](https://github.com/nathanboktae/mocha-phantomjs) (see [mochajs#133](nathanboktae/mocha-phantomjs#133), [mochajs#220](nathanboktae/mocha-phantomjs#220), etc).  Maintains support for running the XUnit reporter in a browser (unlike the previously reverted PR mochajs#1068).

ping @alemangui, @nathanboktae

Thanks all.
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

Successfully merging this pull request may close these issues.

Using xunit output with -f option produces empty file
4 participants