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
However, when using TypeScript and Jest with @jest/globals, the declarations provided by the package doesn't work. E.g.:
import'jest-extended';import{expect}from'@jest/globals';// TS2339: Property toIncludeSameMembers does not exist on typeexpect([]).toIncludeSameMembers([]);
Have you considered this use case? Thank you.
The text was updated successfully, but these errors were encountered:
However the problem is that the object exported by jest-extended is of type CustomMatchers<any>, which results in expect() returning an object that allows arbitrary members, compromising type safety. If the package exported the generic CustomMatchers interface itself, alleviating the need for typeof, we could do:
Hello!
Thank you for this great library!
However, when using TypeScript and Jest with
@jest/globals
, the declarations provided by the package doesn't work. E.g.:Have you considered this use case? Thank you.
The text was updated successfully, but these errors were encountered: