Replies: 4 comments 5 replies
-
You have other global expect type contradicting with ours |
Beta Was this translation helpful? Give feedback.
-
EDIT: I was wrong about thinking that it works on my other machine, because it was just initialising there and not yet underlining the issue... So the same issue is on both instances of vscode. Even in a dev docker container. EDIT2: So I found the root cause. In the root of my repo I had index.d.ts with: declare const expect: Chai.ExpectStatic I totally didn't know about this there lol. |
Beta Was this translation helpful? Give feedback.
-
I have the same problem but didn't declare any const or anything. I searched through every file but I found nothing.
Do you have any idea what I'am missing? @sheremet-va 😕 |
Beta Was this translation helpful? Give feedback.
-
When I did 'vitest run', it ran all the tests without any errors, but vscode still showed errors for 'test', 'expect' or 'describe'. |
Beta Was this translation helpful? Give feedback.
-
I have followed the instructions to add vitest/globals into tsconfig so that typescript should recognise globals. But it does not.
expect.toEqual is missing.
tsconfig.json
vitest.config.ts
test file:
Any idea what's wrong?
Beta Was this translation helpful? Give feedback.
All reactions