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

Support mocha reporters #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Support mocha reporters #5

wants to merge 4 commits into from

Conversation

ForbesLindesay
Copy link

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:

Imgur

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
Copy link

loopj commented Feb 9, 2013

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

@SlexAxton
Copy link

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.

@ForbesLindesay
Copy link
Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants