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.
Add support for all the standard mocha reporters
Update readme to use reporters in the example
Emit raw jssn as an event
Polyfill console and stream to client
Creates extra events for 'console-methodName' where `methodName` is log,
error, info etc.
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.