-
-
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
mocha.js browser version: support for third party reporters #1592
Comments
Bump......? |
Will take a look this evening! Sorry for the late reply |
Awesome, thanks. On Monday, March 16, 2015, Daniel St. Jules notifications@github.com
|
Hi @errold32, you're right - it doesn't look like there's any support for Third Party reporters in the browser. Sorry about that. I'm not sure if anyone's planned on taking this on yet. If this is a more immediate request/need, you could consider using https://github.com/metaskills/mocha-phantomjs for their third party reporter support, or maintaining your own temporary fork of the project. If it were supported, considering the work involved in building an HTML reporter - it wouldn't be as simple as writing a custom node reporter. Comparing the dot and html reporters should give you an idea. |
Thanks for the reply. I’ve temporarily solved the problem by making the require function a method of the window object in a similar fashion to the mocha object. This allows me to place the reporter in a separate file, and edit it to my heart’s content. I’ve basically duplicated the html reporter and extended it. Forgive me if I am wrong, but it seems like a few of the reporters included in the mocha.js for browser aren’t really useful in a browser environment because they print to the console. Speaking of printing to the console, the process.stdout.write() stub is also missing, making the JSON reporter for instance do nothing. (or error out in IE). I don’t mean to be critical, but I just wonder about the inclusion of some of those reporters in the browser version of mocha. I think I need the html reporter, but will take a look at phantomjs. Thanks. David From: Daniel St. Jules [mailto:notifications@github.com] Hi @errold32 https://github.com/errold32 , you're right - it doesn't look like there's any support for Third Party reporters in the browser. Sorry about that. I'm not sure if anyone's planned on taking this on yet. If this is a more immediate request/need, you could consider using https://github.com/metaskills/mocha-phantomjs for their third party reporter support, or maintaining your own temporary fork of the project. If it were supported, considering the work involved in building an HTML reporter - it wouldn't be as simple as writing a custom node reporter. Comparing the dot and html reporters should give you an idea. — |
closing in lieu of #1457 |
…n browser Issue mochajs#1592 (So that people who find this issue before the official docs can see this....)
…ser. Issue mochajs#1592 (You can specify a the constructor of your custom reporter in options and mocha will use it)
…ser. Issue mochajs#1592 (You can specify a the constructor of your custom reporter in options and mocha will use it)
…ser. Add the JSON Stream name that is recommended in the documentation as an alias for the json-stream recommender. Issue mochajs#1592 (You can specify a the constructor of your custom reporter in options and mocha will use it)
…ser. Add the JSON Stream name that is recommended in the documentation as an alias for the json-stream recommender. Make references to a reporter's name more uniform. Issue mochajs#1592 (You can specify a the constructor of your custom reporter in options and mocha will use it)
…ser. Make references to a reporters' names more uniform. Issue mochajs#1592 (You can specify a the constructor of your custom reporter in options and mocha will use it)
You can specify a the constructor of your custom reporter in options and mocha will use it. Make references to a reporters' names more uniform.
You can pass the constructor function of your custom reporter in options and mocha will use it.
You can pass the constructor function of your custom reporter in options and mocha will use it.
You can pass the constructor function of your custom reporter in options and mocha will use it.
You can pass the constructor function of your custom reporter in options and mocha will use it.
You can pass the constructor function of your custom reporter in options and mocha will use it.
You can pass the constructor function of your custom reporter in options and mocha will use it.
You can pass the constructor function of your custom reporter in options and mocha will use it.
I am having trouble requiring new reporters using the browser based version of mocha.js. the require object and associated methods seem to be locked away behind the IEFE that surrounds mocha. If this is wrong, feel free to enlighten me.
Also, the process.stdout.write() stub is missing in the browser version of mocha. This makes reporters like JSONreporter, which is included inside the IIFE fail with no output.
Thanks
The text was updated successfully, but these errors were encountered: