Skip to content

Build shallow renderer independently#9375

Merged
bvaughn merged 1 commit intofacebook:15-stablefrom
gaearon:fix-shallow-perhaps
Apr 8, 2017
Merged

Build shallow renderer independently#9375
bvaughn merged 1 commit intofacebook:15-stablefrom
gaearon:fix-shallow-perhaps

Conversation

@gaearon
Copy link
Copy Markdown
Collaborator

@gaearon gaearon commented Apr 8, 2017

Alternative strategy for #9372 which shouldn't suffer from injection issues. My concern here is I'm not sure what happens if components use react-dom (which isn't deduplicated anymore) but I guess any other solutions suffer from the same problem, and we don't really interact with react-dom in shallow tests anyway.

@bvaughn
Copy link
Copy Markdown
Contributor

bvaughn commented Apr 8, 2017

Tested this build:

  • Ran npm run build to build modules (without errors).
  • Can I make a new project with only react + react-test-renderer and some tests? Yes.
  • Can I use both react-test-renderer and react-test-renderer/shallow in the same tests? Yes.
  • Then I copied react + react-dom into react-virtualized and verified that all the unit tests passed and the demo site seemed to work correctly.

@gaearon
Copy link
Copy Markdown
Collaborator Author

gaearon commented Apr 8, 2017

Wow I fixed a bug! Not every day I get to do this with React. 😄

@gaearon gaearon deleted the fix-shallow-perhaps branch April 8, 2017 04:10
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.

3 participants