-
Notifications
You must be signed in to change notification settings - Fork 47.1k
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
Include TestUtils with production version of react #5649
Comments
I think so. I can't think of anything off the top of my head that is reaching into dev-only internals. |
Cool, thanks! My coworker also thought about just building I'll leave this issue open until it's resolved for us. Having more options for this kind of stuff would be great. |
This is a problem for us as well- we'd like the free performance boost and other benefits of the production build, but can't use it because we can't run our unit tests. |
I’ll close this as stale. In 15, you could certainly run TestUtils in production mode if you wanted to, but you’d need to bundle React yourself (with CommonJS). For obvious reasons we can’t just include it in a production build we ship to everyone. In 16 this actually regressed but we’re tracking that in #10938. |
At Mozilla, our testing infrastructure for Firefox forces us to use a "production" build of Firefox that represents an exact build of Nightly that a user would use. The problem with this and that it uses a production version of React, which does not have TestUtils included, and we need that to run our JS tests.
Is there any reason other than JS code size that it is only included in the dev version? If we just forcefully include
TestUtils
with our production version of React, will that work? I'm fine with doing a custom build for that.Right now we had to switch to only use the dev version but I want to fix this ASAP.
The text was updated successfully, but these errors were encountered: