joaopaulomoraes / reactjs-vite-tailwindcss-boilerplate

This is a boilerplate build with Vite, React 18, TypeScript, Vitest, Testing Library, TailwindCSS 3, Eslint and Prettier.
https://reactjs-vite-tailwindcss-boilerplate.vercel.app
MIT License
530 stars 105 forks source link

Missing types for jest-dom #51

Closed harmyderoman closed 2 years ago

harmyderoman commented 2 years ago

TS throw errors. I solved it by adding @types/testing-library__jest-dom. I use @testing-library/jest-dom version 5.16.4

joaopaulomoraes commented 2 years ago

Could you please provide a testable example, @harmyderoman?

joaopaulomoraes commented 2 years ago

Which package manager are you using?

harmyderoman commented 2 years ago

Which package manager are you using?

pnpm

joaopaulomoraes commented 2 years ago

I've done the README process from scratch, using other management packs, and unfortunately I haven't been able to reproduce the problem.

If you have more details that can help with the debug that would be great, if not we can close this issue for now and reopen if something new changes/happens.

Thanks for helping :p

harmyderoman commented 2 years ago

The error I've got in the file test.tsx:

Property 'toBeInTheDocument' does not exist on type 'JestMatchers<HTMLElement>'.ts(2339)
joaopaulomoraes commented 2 years ago

Do you follow the README steps? I reproduce the necessary steps and I couldn't catch this error

joaopaulomoraes commented 2 years ago

I will be closing this issue, if I have more details or steps to reproduce the problem, it can be reopened, thanks ❤️