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

terminal console warning: updated reference to ReactTestUtils to be react-dom/test-utils #151

Closed
thescientist13 opened this issue Apr 24, 2017 · 6 comments

Comments

@thescientist13
Copy link
Owner

$ yarn run test
  console.error node_modules/fbjs/lib/warning.js:36
    Warning: ReactTestUtils has been moved to react-dom/test-utils. Update references to remove this warning.
@jpoo90
Copy link
Contributor

jpoo90 commented Apr 24, 2017

@thescientist13 Did you find a case were enzyme was not able to replace test-utils?

Since we are using enzyme, I think we can remove the dependency on test-utils. Let me know your thoughts.

@thescientist13
Copy link
Owner Author

@jpoo90
I haven't looked, but that sounds like the right way to go to me.

@thescientist13 thescientist13 changed the title change reference to ReactTestUtils to use react-dom/test-utils terminal console warning to change reference to ReactTestUtils to use react-dom/test-utils Apr 24, 2017
@jpoo90
Copy link
Contributor

jpoo90 commented Apr 24, 2017

@thescientist13

Update:

  1. I was wrong about removing test-utils, Enzyme requires it to work.

  2. There's been a lot going on about these warning messages. Latest enzyme and React changed some dependencies. Reading about it to see what needs to be changed on this project.

@thescientist13
Copy link
Owner Author

Thanks for reviewing @jpoo90 !

@thescientist13 thescientist13 changed the title terminal console warning to change reference to ReactTestUtils to use react-dom/test-utils terminal console warning: updated reference to ReactTestUtils to be react-dom/test-utils Apr 25, 2017
@jpoo90
Copy link
Contributor

jpoo90 commented Apr 25, 2017

@thescientist13
I did this:

  1. yarn upgrade react react-dom enzyme react-test-renderer

  2. Moved react-addons-test-utils to the devDependencies and upgraded it.

After this the test utils warnings disappear, but now we got:

 Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.

 RouterContext: React.createClass is deprecated and will be removed in version 16. Use plain JavaScript classes instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement.

We are not using PropTypes nor React.createClass in the project, but React generates the warnings if any dependency in the entire tree references a deprecated property.

We'll need to keep an eye on releases on the dependencies. Let me know if you want me to open a PR with these updates.

@thescientist13
Copy link
Owner Author

seems like the upgrades in #156 has removed this error! 🎉

Will close this when #157 gets merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants