-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Conversation
xunit reporter should use process.stdout.write instead of console.log
This breaks work mocha in browser. |
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? |
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. |
now it doesn't have newlines either |
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. |
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.)
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.
Simple change that fixes nathanboktae/mocha-phantomjs#114 and makes it more consistent with other formatters that should not have formatting like
json
.