Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document asymmetric matching capabilities #58

Open
emahuni opened this issue Aug 19, 2022 · 1 comment
Open

Document asymmetric matching capabilities #58

emahuni opened this issue Aug 19, 2022 · 1 comment

Comments

@emahuni
Copy link

emahuni commented Aug 19, 2022

Description

This library is very good. However the documentation doesn't mention that the matchers are also asymmetric. I had to test this by doing:

expect([{ dt: new Date('2021-08-29') }]).toBeArrayOf({ dt: 
   expect.toBeDateInMonth(7)
 });

It'd be nice if this was mentioned as this is one of the best things about this lib.

Also document that this works with Vitest

@JamieMason
Copy link
Owner

Thanks @emahuni, this is a good idea. Keep an eye on #51 though as some of the non-trivial matchers have some issues when used as asymmetric matchers at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants