jest-dom icon indicating copy to clipboard operation
jest-dom copied to clipboard

Property 'toBeInTheDocument' does not exist on type 'Assertion'.ts(2339)

Open elite0107 opened this issue 2 years ago • 1 comments

I followed the introduction how to use jest with typescript. I created jest.setup.ts file and imported @testing-library/jest-dom. But getting unexpected error and couldn't find a way to solve this issue.

Property 'toBeInTheDocument' does not exist on type 'Assertion'.ts(2339)

my package.json file is as follows.

{
   ...
   "@testing-library/jest-dom": "^6.1.4",
   "@testing-library/react": "^14.0.0",
   "@testing-library/user-event": "^14.5.1",
   "@types/jest": "^29.5.6",
   "@types/testing-library__jest-dom": "^6.0.0",
   ...
}

elite0107 avatar Oct 26 '23 02:10 elite0107