-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Unexpected warnings generated during npm test
when using enzyme
.
#1951
Comments
Hi, thanks for the bug report, but this is an enzyme bug, not CRA. |
Huzzah! After posting this, I thought, "Oh my, that is probably an enzyme issue, not a create-react-app issue". Glad to hear that it's reported and being handled. Thanks for being a gentleman and a scholar, @Timer |
Could try |
cmoesel
added a commit
to AHRQ-CDS/AHRQ-CDS-Connect-Authoring-Tool
that referenced
this issue
Feb 21, 2018
Running tests emitted some console warnings that were coming from test dependencies. Fixed this by adding react-test-renderer and updating react-addons-test-utils. See: facebook/create-react-app#1951
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Can you reproduce the problem with latest npm?
Yup!
Description
When running
npm test
and basic smoke tests using airbnb/enzyme, I get errors about ReactTest Utils and Shallow rendering.This code:
Generates these warnings:
This does not happen when I create a smoke test without enzyme:
And, because it's probably necessary to track down the problems with this issue, here's my
package.json
:I'd like to use enzyme, because I think it's the bee's knees 🐝 (because obviously makes mounting and shallow rendering components really easy).
I want to eliminate warnings, because to me those are as bad as errors and I don't want to ignore them (or potentially ignore other warnings because I go warning-blind).
Expected behavior
I expect that this code will not generate warnings:
Actual behavior
The above code generates warnings outlined in the description.
Environment
react-scripts@0.9.5
v6.10.0
4.4.4
OS X El Capitan 10.11.6
N/A - this is in the command line
Reproducible Demo
https://github.com/csalvato/cra-warnings-using-enzyme
The text was updated successfully, but these errors were encountered: