diff --git a/README.md b/README.md index 1778f8fe..d864bf40 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,23 @@ setupFilesAfterEnv: ['/jest-setup.js'] ### With TypeScript +Install the Typescript types via your package manager, and usually only needs to be done when your package manager requires all dependencies explicitly installed (pnpm, yarn@>=2). + +```sh +# for npm +npm install -D @types/testing-library__jest-dom +``` + +```sh +# for yarn +yarn add -D @types/testing-library__jest-dom +``` + +```sh +# for pnpm +pnpm add -D @types/testing-library__jest-dom +``` + If you're using TypeScript, make sure your setup file is a `.ts` and not a `.js` to include the necessary types.