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

jsdom #6

Merged
merged 1 commit into from
Sep 16, 2015
Merged

jsdom #6

merged 1 commit into from
Sep 16, 2015

Conversation

zackify
Copy link
Member

@zackify zackify commented Sep 16, 2015

Adding this means, there's no need for you to include jsdom in a setup file every time you write tests. This has a few hacks and things to make testing easier. I need feedback.

  • monkey patch canUseDom due to the way react is loaded so that it is always true.
  • expose React so that in tests you do not need to import React in order to use jsx syntax, ex : Test(<Component/>)
  • jsdom is now a dependency of course.
  • You must import this at the top of every test file for it work work correctly, or at least before you import middleware

I think that's all

fixes #3

Oh and moving to React .14 will be only a small pain I hope :D

@dphaener
Copy link

Like it. I think it's now worth noting in the reader that node 4 or iojs is required.

zackify added a commit that referenced this pull request Sep 16, 2015
@zackify zackify merged commit 56b8354 into master Sep 16, 2015
@zackify zackify deleted the feature/jsdom branch September 16, 2015 17:19
zackify added a commit that referenced this pull request Sep 22, 2015
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.

include jsdom in the library itself
2 participants