From 8fd402a7d68a7583cedb86ddbb116b5cae2ba890 Mon Sep 17 00:00:00 2001 From: mibcadet Date: Fri, 23 Aug 2024 21:57:54 +0200 Subject: [PATCH] docs: how to update tsconfig for vitest matchers extension (#624) --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index dc61211..835b098 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