-
Notifications
You must be signed in to change notification settings - Fork 244
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
user-event has unmet peer dependency dom #439
Comments
Hi @samit4me 👋 thanks for bringing this up 🙂 |
For what it's worth, I just tried using the Test suite failed to run
@testing-library/user-event tried to access @testing-library/dom (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.
Required package: @testing-library/dom (via "@testing-library/dom")
Required by: @testing-library/user-event@virtual:c72221a37f247765bf95117c07460d0dd314f91d55e5ef517953f22f13abe08a4eb4ca8da63ad8106639299813447710808040a06701c40efe08bad531b61747#npm:12.1.3 (via /Users/sj/Developer/myrepo/.yarn/$$virtual/@testing-library-user-event-virtual-114389dc81/0/cache/@testing-library-user-event-npm-12.1.3-4ed5fba7b9-af9844d63d.zip/node_modules/@testing-library/user-event/dist/)
Ancestor breaking the chain: sample@workspace:.
Require stack:
.yarn/$$virtual/@testing-library-user-event-virtual-114389dc81/0/cache/@testing-library-user-event-npm-12.1.3-4ed5fba7b9-af9844d63d.zip/node_modules/@testing-library/user-event/dist/click.js
.yarn/$$virtual/@testing-library-user-event-virtual-114389dc81/0/cache/@testing-library-user-event-npm-12.1.3-4ed5fba7b9-af9844d63d.zip/node_modules/@testing-library/user-event/dist/index.js
src/app/sign-in.test.tsx package.json: "devDependencies": {
...
"@testing-library/cypress": "^6.0.1",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.0.0",
"@testing-library/user-event": "^12.1.3", Installing |
In my case I'm using bit.dev to build the isolated components three dependencies, for fix this issue, I must use import { render } from '@testing-library/dom' instead of import { render } from '@testing-library/react' |
Using
@testing-library/[email protected]
and@testing-library/react"@10.4.9
in a project and when runningyarn install
I get the following warning:I see that
@testing-library/dom
is listed indevDependencies
so not sure why this is happening 🤷♂️user-event/package.json
Line 44 in a5b3350
Looks like this was raised and resolved previously #335 and also mentioned in CRA facebook/create-react-app#8446
Thoughts?
The text was updated successfully, but these errors were encountered: