-
Notifications
You must be signed in to change notification settings - Fork 403
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
expect().toContainHTML()
doesn't work
#408
Comments
expect().toContainHTML()
doesn't work
Same for me. I just wanted to check is div not empty... |
Hello @VSlobolinskyi, I've seen that you are doing an assert using only the opening tag Also, I would recommend you to replace the usage of this matcher by another one that mimics the way the user perceives the app, as it would fit more in the philosophy behind jest-dom (this is also an advice the maintainers give in the README). |
@testing-library/jest-dom
version: 5.14.1node
version: 14.15.4npm
version: 6.14.13react-testing-library
version: 11.2.7Relevant code or config:
You could find everything in the repository in the todo.test.js file.
What you did:
Run
npm run test
.What happened:
Reproduction:
Use the project from this repo, and change
@testing-library/jest-dom
to version: 5.14.1https://github.com/VSlobolinskyi/react_testing
Problem description:
One of the core functionalities of jest is unavailable
Suggested solution:
Reference
@testing-library/jest-dom
: 5.11.8, this version doesn't have this bug. I use it in the repository(5.11.9 already has this bug)The text was updated successfully, but these errors were encountered: