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
I was making up a project vite react with typescript through one and other ways but i always have the following mistake
What happened:
This is the mistake:
Problem description:
Property 'toBeInTheDocument' does not exist on type 'Matchers<void, HTMLElement> & SnapshotMatchers<void, HTMLElement> & Inverse<JestMatchers<void, HTMLElement>> & PromiseMatchers<...>'.
Property 'toBeDisabled' does not exist on type 'JestMatchers<void, HTMLElement>'.
Suggested solution:
I have tried through one and other ways to solution this mistake but what it say me that it's a problem own package is the following:
what i make is import the package "@testing-library/jest-dom" with the mean the test file recognize me the methods like "toBeInTheDocument", "toBeDisabled" but i always will get the same. If somebody know the solution i will appreciate it
The text was updated successfully, but these errors were encountered:
Already I find what is the problem, basically i had put the following line "import '@testing-library/jest-dom'" in the top each file for avoid them syntax error about jest DOM
import'@testing-library/jest-dom'...
besides about it, i have made a lot of configurations in some files for set up jest in vite react project with typescript, so if you want to see this configurations, i put below the gist url about it
@testing-library/jest-dom
version: 6.3.0 | 5.16.5 | 5.17node
version: v20.10.0jest
version: 29.7.0yarn
version: 1.22.21Other dependencies:
Relevant code or config:
What you did:
I was making up a project vite react with typescript through one and other ways but i always have the following mistake
What happened:
This is the mistake:
Problem description:
Property 'toBeInTheDocument' does not exist on type 'Matchers<void, HTMLElement> & SnapshotMatchers<void, HTMLElement> & Inverse<JestMatchers<void, HTMLElement>> & PromiseMatchers<...>'.
Property 'toBeDisabled' does not exist on type 'JestMatchers<void, HTMLElement>'.
Suggested solution:
I have tried through one and other ways to solution this mistake but what it say me that it's a problem own package is the following:
what i make is import the package "@testing-library/jest-dom" with the mean the test file recognize me the methods like "toBeInTheDocument", "toBeDisabled" but i always will get the same. If somebody know the solution i will appreciate it
The text was updated successfully, but these errors were encountered: