forked from romgain/jest-websocket-mock
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Hi there,
I'm using vitest with typescript and somehow the custom matchers toHaveReceivedMessages and toReceiveMessage cannot be resolved correctly: Property 'toReceiveMessage' does not exist on type 'Assertion'.ts(2339)
If I replace 'vitest' by '@vitest/expect' in the module declaration (src/extend-expect.ts), everything works as expected and the types can be resolved.
declare module '@vitest/expect' {
// eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-explicit-any
interface Assertion<T = any> extends CustomMatchers<T> {}
...
If that makes any sense, I'm happy to provide a PR :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels