You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting point :
If we add @testing-library/jest-dom just to one of the test files, all the error messages disappear.
If vitest.setup.ts file is opened in IDE, the error messages automatically disappear.
Tried methods :
Adding @testing-library/jest-dom/vitest in types array in tsconfig.json file
Upgarde @testing-library/jest-dom to the latest version
Add @vitest/expect as a new dependency
Create .npmrc file with public-hoist-pattern[]=@types/*
🐛 Description
All the test files containing
toBeInTheDocument()
have errors : "La propriété 'toBeInTheDocument' n'existe pas sur le type 'Assertion'"🔍 Steps to Reproduce
Steps to reproduce the behavior:
✅ Expected Behavior
The tests files should not contain any error.
❌ Actual Behavior
An error is present everywhere where "toBeInTheDocument()" is used.
📸 Screenshots
💻 Environment
The text was updated successfully, but these errors were encountered: