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
Consider providing a UMD build for TestUtils again #11111
Comments
@gaearon: I'm currently blocked on upgrading our application to React 16 due to the lack of a UMD build of TestUtils. Shall I compile one and submit a PR? |
Can you describe your use case in more detail? Why do you need a UMD build of something intended only for testing? |
Our application is non-trivially large, and module systems that involve transpiling our JS are unworkably slow. We used to use Webpack but cut it because it was taking 40 seconds plus for every development build (after Typescript as well). We have no choice but to use UMD if we don't want to wait multiple minutes every time we make any script change in development. |
What @markboyall said 👍 |
OK that sounds reasonable. Happy to take a PR. |
Any workarounds for using |
All var div = document.createElement('div');
ReactDOM.render(<App />, div); Just use it directly. |
What about |
In general I recommend simulating real DOM events instead of using node.dispatchEvent(new MouseEvent('click', {bubbles: true, cancelable: true})); But again, as per feedback in this issue, we'll add a UMD build for TestUtils in later versions again. |
Didn't saw this recommendation in React Docs. Thank you. |
Yep, we'll need to document this. I'll file an issue for the doc repo. |
Filed reactjs/react.dev#352. |
I noticed we stopped providing it, but a bunch of fiddles for old bugs use it.
I wonder if we should add it back, e.g. as
react-dom-test-utils.development.js
.Let’s hear what people have to say.
The text was updated successfully, but these errors were encountered: