Skip to content

Commit 8fd402a

Browse files
authored
docs: how to update tsconfig for vitest matchers extension (#624)
1 parent fdee851 commit 8fd402a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Diff for: README.md

+14
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,20 @@ import '@testing-library/jest-dom/vitest'
162162
setupFiles: ['./vitest-setup.js']
163163
```
164164

165+
Also, depending on your local setup, you may need to update your `tsconfig.json`:
166+
167+
```json
168+
// In tsconfig.json
169+
"compilerOptions": {
170+
...
171+
"types": ["vitest/globals", "@testing-library/jest-dom"]
172+
},
173+
"include": [
174+
...
175+
"./vitest.setup.ts"
176+
],
177+
```
178+
165179
[vitest]: https://vitest.dev/
166180
[vitest setupfiles]: https://vitest.dev/config/#setupfiles
167181

0 commit comments

Comments
 (0)