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

Document that react-test-renderer requires 15.3.0 (IE9+) #1364

Closed
LouisStAmour opened this issue Aug 3, 2016 · 3 comments
Closed

Document that react-test-renderer requires 15.3.0 (IE9+) #1364

LouisStAmour opened this issue Aug 3, 2016 · 3 comments

Comments

@LouisStAmour
Copy link

LouisStAmour commented Aug 3, 2016

Just spent the last hour or so trying to get a basic example of react-test-renderer running with Jest and React 0.14.8. I figured since react-test-renderer required React 15.3.0, that the previous version of react-test-renderer, 1.1.0, would be fine but support React 0.14.8.

I was wrong. react-test-renderer 1.1.0 seems to be an entirely different beast, not meant to be used with Jest snapshots. The syntax is completely different, as currently documented at https://www.npmjs.com/package/react-test-renderer -- for example, it calls itself render, has no create method, and returns a bunch of query functions instead of a component.

So you might be wondering, why am I using 0.14.8 instead of 15.3? Well, it's simple. I still need IE 8 support. So I'm off to find another method for tests then... at least until IE 8 support isn't a requirement.

For Googlers, if you get the following error, it's because you're trying to use 15.3.0 syntax with 1.1.0:

  - TypeError: _reactTestRenderer2.default.create is not a function
@LouisStAmour LouisStAmour changed the title Docs should mention react-test-renderer requires React 15.3.0 react-test-renderer docs could mention React 15.3.0 (IE8 compatibility) Aug 3, 2016
@LouisStAmour LouisStAmour changed the title react-test-renderer docs could mention React 15.3.0 (IE8 compatibility) react-test-renderer docs could mention React 15.3.0 (IE 9+ only) Aug 3, 2016
@LouisStAmour LouisStAmour changed the title react-test-renderer docs could mention React 15.3.0 (IE 9+ only) react-test-renderer docs could mention React 15 (IE 9+ only) Aug 3, 2016
@LouisStAmour LouisStAmour changed the title react-test-renderer docs could mention React 15 (IE 9+ only) Doc suggestion: react-test-renderer requires React 15 (IE9+) Aug 3, 2016
@LouisStAmour LouisStAmour changed the title Doc suggestion: react-test-renderer requires React 15 (IE9+) Document that react-test-renderer requires 15.3.0 (IE9+) Aug 3, 2016
@cpojer
Copy link
Member

cpojer commented Aug 16, 2016

I think it makes sense to assume that react-test-renderer and react will be published together and the same version of both should be used, just like for react-dom. I don't expect this to be an issue going forward and I believe your issue here is enough documentation now. Thank you for documenting it.

@cpojer cpojer closed this as completed Aug 16, 2016
@dickeylth
Copy link

So I'm wondering where the doc for [email protected] exists?

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants