From 14e09d73d024094c46481c9e35ecbeef17b1a186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Fri, 2 Aug 2024 16:56:46 -0400 Subject: [PATCH] Update tsconfig setup instructions in the README --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 11f2dd4..4d16aa2 100644 --- a/README.md +++ b/README.md @@ -170,15 +170,20 @@ setupFiles: ['./vitest-setup.js'] If you're using TypeScript, make sure your setup file is a `.ts` and not a `.js` to include the necessary types. -You will also need to include your setup file in your `tsconfig.json` if you -haven't already: +You will also need to include the following in your `tsconfig.json`: ```json +{ // In tsconfig.json "include": [ - ... + // ... "./jest-setup.ts" ], + "compilerOptions": { + // ... + "types": ["@testing-library/jest-dom"] + } +} ``` ### With another Jest-compatible `expect`