From 193bf954dac6449ffc710aa9da07cd2b28f7ea7e Mon Sep 17 00:00:00 2001 From: mibcadet Date: Wed, 21 Aug 2024 23:14:01 +0200 Subject: [PATCH] Readme - how to update tsconfig for vitest matchers extension --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 11f2dd4c..db63dc7d 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,20 @@ import '@testing-library/jest-dom/vitest' setupFiles: ['./vitest-setup.js'] ``` +Also, depending on your local setup, you may need to update your `tsconfig.json`: + +```json + // In tsconfig.json + "compilerOptions": { + ... + "types": ["vitest/globals", "@testing-library/jest-dom"] + }, + "include": [ + ... + "./vitest.setup.ts" + ], +``` + [vitest]: https://vitest.dev/ [vitest setupfiles]: https://vitest.dev/config/#setupfiles