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
Hello, thanks for the bindings!
I've looked into the code and as far as I can see, the Expect module creates jest assertions via assertion variant. This makes the API clean, but doesn't really allow users to introduce custom matchers. E.g. we use jest-dom and testing-library/jest-native and we weren't been able to properly cooperate the custom matchers with Expect module.
The text was updated successfully, but these errors were encountered:
Hello, thanks for the bindings! I've looked into the code and as far as I can see, the Expect module creates jest assertions via assertion variant. This makes the API clean, but doesn't really allow users to introduce custom matchers. E.g. we use jest-dom and testing-library/jest-native and we weren't been able to properly cooperate the custom matchers with Expect module.
Same problem here.
I had to vendor this library and add the extra needed matchers.
Would love to know if the author recommends a solution better than forking the library and adding the matchers.
Anyways thanks for this work.
It should be possible to create a custom asserter and awkwardly re-exposing and forwarding the original assertions to the default asserter. But it wasn't really designed for extensibility, even if that's long been desired. It would likely require a complete rewrite of the internals, and I don't have time to do that. But I would certainly welcome efforts to do so while at the very least retaining the design philosophy, if not the API.
Hello, thanks for the bindings!
I've looked into the code and as far as I can see, the
Expect
module creates jest assertions viaassertion
variant. This makes the API clean, but doesn't really allow users to introduce custom matchers. E.g. we use jest-dom and testing-library/jest-native and we weren't been able to properly cooperate the custom matchers withExpect
module.The text was updated successfully, but these errors were encountered: