-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat(jest): add support for vitest #231
Conversation
@m-radzikowski could you please review this PR? thank you! |
Interesting to see that you can make this compatible for both |
@stschulte |
I would love to see this merged as well! |
Hey, that looks nice. I'll try to review it fully this week, there is quite a lot of changes here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of nice work! I put some comments, generally small things, please check it out.
…` in the same file
Thanks for the changes! The tests are failing because you didn't update the import in Apart from that, it looks good. My only concern now is if having dependencies on both If you fix the build, I will merge it and release a beta version. |
Updated the import.
I had considered the same thing, so I didn't reference any types from either package in |
I've merged but the build on main failed: https://github.com/m-radzikowski/aws-sdk-client-mock/actions/runs/11128928698 I'm away now so I can only merge something from mobile. I can fix it and release in 1.5 week or you can make a PR to fix it if you want it released sooner. |
Released in v4.1.0-beta.0 |
Close #216
Some code comes from a nice package https://github.com/stschulte/aws-sdk-client-mock-vitest, which adds custom matchers for only vitest.
change for implemetation of matchers
objectContaining(input).asymmetricMatch(received.input)
instead ofthis.equals(received, expect.objectContaining(input))
for compatibilityMatcherContext
,ExpectationResult
, etc. for compatibilityvitest support
import 'aws-sdk-client-mock-jest/vitest'
toHaveBeenCalled
,toHaveBeenCalledTimes
,toHaveBeenCalledWith
,toHaveBeenNthCalledWith
)