Conversation
MatanBobi
left a comment
There was a problem hiding this comment.
This looks good for now, but I'm trying to understand why only user-event defines a peerDep unlike all the other packages that have testing-library/dom as a dependency.
|
There's rationale here: testing-library/user-event#135 @MatanBobi @kentcdodds @ph-fritsche Do you have any thoughts on this? I think it's a bit surprising that User Event still uses peer dependencies, while framework libraries like React Testing Library use regular dependencies. Does User Event rely on deduping DOM Testing Library in ways that React Testing Library does not? If the only issue is allowing more flexible dependency resolution, we could just put the Anyway I will merge this for now, since it's currently still a peer dependency, and the docs should be up to date with the readme. |
|
I think that another copy of If For the same reason projects should not add |
|
The reason is pretty simple actually. People using |
|
Reverting this in #1329 (explanation). |
User Event peer depends on DOM Testing Library, so it needs to be manually installed, as stated in the readme.