-
Notifications
You must be signed in to change notification settings - Fork 1.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
[4.1.3] Cannot find module 'jest-dom/extend-expect' #138
Comments
You have to install jest-dom manually. |
Thanks, it works😀 |
I am having the same problem - what does "You have to install jest-dom manually." mean? Thanks. |
It's a separate package
|
I've done that; its in my package.json (^3.1.3) |
|
any update on this? There's still a lot of mixed info out there - jest-dom is now packaged in, toBeInTheDocument must come from jest-dom, jest-dom is deprecated, it's @testing-library/jest-dom now, you need to import it, you don't need to import it... All the set-up guides are out of date. If I |
@s-Hale Did you install |
I am still getting this error nothing is fixing it jest-dom has moved to @testing-library/jest-dom. Please uninstall jest-dom and install @testing-library/jest-dom instead, or use an older version of jest-dom. Learn more about this change here: testing-library/dom-testing-library#260 Thanks! |
replace |
Step 1: Uninstall jest-dom(deprecated one) Step 2:Install testing-library/jest-dom Step 3:Replace Thanks @stevenYouhana |
If some of you still have the problem: I fixed it by using
instead of This is the recommanded usage by the official documentation |
FYI // In tsconfig.json |
That worked for me. Thank you, @Ronald-Cifuentes |
Thanks it works for me. |
Had to forget (at least) one testing-library/react-testing-library#138 (comment)
react-testing-library
version: 4.1.4react
version: 16.4.1node
version: 9.11.1npm
(oryarn
) version: yarn 1.3.2Relevant code or config:
entire test code
https://github.com/ryota-murakami/redux-boilerplate-less-architecture/blob/master/src/pages/github/index.test.js
What you did:
What happened:
Test Broke with
Cannot find module 'jest-dom/extend-expect'
Reproduction:
In 4.1.3 case, the above Error occurred. https://circleci.com/gh/ryota-murakami/redux-boilerplate-less-architecture/569?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link
In 4.1.2 case, test is all green. (https://circleci.com/gh/ryota-murakami/redux-boilerplate-less-architecture/591?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link)
I don't know why is that happening because there is no
jest-dom
change [https://github.com/kentcdodds/react-testing-library/compare/v4.1.2...v4.1.3](between v4.1.2v4.1.3).
something of dom-testing-liblary?
thanks😀
The text was updated successfully, but these errors were encountered: