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

Run some tests in Node environment #11948

Merged
merged 2 commits into from Jan 2, 2018
Merged

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Jan 2, 2018

Fixes #4592:

  • Switches tests that shouldn’t require DOM to run in a pure Node environment.
  • Splits the SSR test file into pure SSR and hydration so that we can test pure SSR in a Node environment.

Verified that using document in shallow renderer and SSR now fails the tests.

Copy link
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh cool. I didn't know about @jest-environment node 😄

LGTM

@gaearon gaearon merged commit 0deea32 into facebook:master Jan 2, 2018
@gaearon gaearon deleted the node-env branch January 2, 2018 18:42
yenshih pushed a commit to yenshih/react that referenced this pull request Jan 6, 2018
* Run some tests in Node environment

* Separate SSR tests that require DOM

This allow us to run others with Node environment.
NMinhNguyen referenced this pull request in enzymejs/react-shallow-renderer Jan 29, 2020
* Run some tests in Node environment

* Separate SSR tests that require DOM

This allow us to run others with Node environment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants