You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working to replace jest with vitest in our current codebase. I'm able to use the @emotion/jest matchers in vitest by simply expect.extend({ ...matchers }); and it works without issue. However, during build and typechecking, it is failing as the jest types are no longer included in our project. Cannot find type definition file for 'jest', and also on SnapshotSerializerPlugin and ExpectExtendMap.
Proposed solution
Ideally a vitest compatible type definition. I don't think it needs to be a new package at all, just a new export, similar to how @testing-library/jest-dom/vitest is handled.
Alternative solutions
I was able to stop the errors from being displayed by setting skipLibCheck: true in our tsconfig.json, but it is not an ideal situation.
The text was updated successfully, but these errors were encountered:
The problem
I'm working to replace jest with vitest in our current codebase. I'm able to use the @emotion/jest matchers in vitest by simply
expect.extend({ ...matchers });
and it works without issue. However, during build and typechecking, it is failing as the jest types are no longer included in our project.Cannot find type definition file for 'jest'
, and also onSnapshotSerializerPlugin
andExpectExtendMap
.Proposed solution
Ideally a vitest compatible type definition. I don't think it needs to be a new package at all, just a new export, similar to how
@testing-library/jest-dom/vitest
is handled.Alternative solutions
I was able to stop the errors from being displayed by setting
skipLibCheck: true
in our tsconfig.json, but it is not an ideal situation.The text was updated successfully, but these errors were encountered: