Skip to content
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

Updating Jest-Dom breaks testing #5

Open
danadn opened this issue Sep 6, 2023 · 1 comment
Open

Updating Jest-Dom breaks testing #5

danadn opened this issue Sep 6, 2023 · 1 comment

Comments

@danadn
Copy link

danadn commented Sep 6, 2023

Reproduce error:

  • Download repo and setup the app
  • Go to packages-json and update jest-dom to 6.1.3:
    "@testing-library/jest-dom": "^5.16.5", -> "@testing-library/jest-dom": "^6.1.3",
  • Run npm test
  • The following error is launched:
image
@CodeWithBenjii
Copy link

CodeWithBenjii commented Sep 11, 2023

You need to change the import from

import matchers from '@testing-library/jest-dom/matchers';

to

import * as matchers from '@testing-library/jest-dom/matchers';

Cheers,
Benji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants