Skip to content

Commit

Permalink
Update tsconfig setup instructions in the README
Browse files Browse the repository at this point in the history
  • Loading branch information
gnapse authored Aug 2, 2024
1 parent 47a667c commit 14e09d7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 14e09d7

Please sign in to comment.