-
Notifications
You must be signed in to change notification settings - Fork 2
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
Migrate tests to Mocha #163
Conversation
@@ -0,0 +1,11 @@ | |||
// Via http://www.asbjornenge.com/wwc/testing_react_components.html | |||
module.exports = function(markup) { | |||
if (typeof document !== 'undefined') return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's going on with this check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd guess it's there to make this a no-op in a real browser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see the attribution now, makes sense.
Awesome! LGMT % travis + a few comments. |
The name says it all. High order bits:
@global
feature mucks with the node.js module cache & fundamentally breaks React, which expects to only be loaded once.@jsx
in it. I tried renaming all our components to.jsx
, but this made node-inspector less pleasant.sinon
for stubs andassert
for tests. We can use something fancier likechai
if you prefer.Tests run a lot faster now, and hopefully less flakily!
Fixes #128