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

Already on GitHub? Sign in to your account

Support mocha reporters #5

wants to merge 4 commits into


None yet
3 participants

This pull request changes the API significantly. Instead of handling events on the client and saving info into mochaResults, we serialize all the event information and send it to the reporter as JSON. By using jssn it can send circular references fine and also re-construct the prototype chains properly on arrival.

The upshot of the API change is that you can use any of the standard mocha reporters. Here is a demo of browser side tests running with the spec reporter:


Note that the timing at the end is sadly completely erroneous, but could be fixed if the timing was done in the runner and not in the reporter.

loopj commented Feb 9, 2013

Ok this is pretty badass, looking forward to seeing this merged in

This may work with component.js - but seems to fail without it. Perhaps it's just older, but it just seems like there are raw require statements in client.js that can't be run in a normal environment.

Yes, but all that's then needed is a compiled version. Component can generate standalone builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment