testing-library-docs
testing-library-docs copied to clipboard
docs: reintroduce import/require usage for user-event
It seems like when the docs for user-event 14 were released, the docs on import/require usage were removed. However, this reintroduces issues like https://github.com/testing-library/user-event/issues/485 if you don't already know how to destructure the default export from the CJS module. I fixed this by copying my docs from user-event 13 (https://github.com/testing-library/user-event/pull/495).
Deploy Preview for testing-library ready!
| Name | Link |
|---|---|
| Latest commit | a45ced8caf8805404e9bf0950f6d8754699dcb3a |
| Latest deploy log | https://app.netlify.com/sites/testing-library/deploys/630312f60e8cae0008ef16c7 |
| Deploy Preview | https://deploy-preview-1143--testing-library.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
I know, but without this there isn't any mention on how to safely use user-event with CJS, and since this issue doesn't apply to other Testing Library packages, I don't think it would be obvious.
If you have any suggestions on how to simplify this while still safely importing user-event, I'm open to it. Otherwise, I think it would be a good idea to merge.