Instructions for usage with Vitest don't work for me #587
Replies: 5 comments 2 replies
-
|
I have the same issue. |
Beta Was this translation helpful? Give feedback.
-
|
Have a read-through of #567 (comment) it might help. |
Beta Was this translation helpful? Give feedback.
-
|
@andykenward I already have my |
Beta Was this translation helpful? Give feedback.
-
|
Got it working on my end. I needed to ensure that our monorepo didn't have conflicting |
Beta Was this translation helpful? Give feedback.
-
|
I was having the same issue and it wasn't enough to just add the setup file to {
"compilerOptions": {
"types": ["@testing-library/jest-dom/vitest"]
}
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I've been helping my team switch from Jest to Vitest, and I noticed that I was getting a lot of type errors along the lines of
Property toBeInTheDocument does not exist on type JestMatchers<HTMLElement>. After a little digging I realised I could fix it by replacingwith
in my
vitest.setup.tsfile.This seems be the opposite of the instructions on the npm page, so I'm wondering if this is a side effect of me doing something else wrong?
Beta Was this translation helpful? Give feedback.
All reactions