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
In many case, I usually use both toHaveBeenCalledTimes and toHaveBeenCalledWith when test a function.
But some functions are avoked more than 2 time, so toHaveBeenNthCalledWith has to be repeated with different args.
This makes code longer. so i'm currently using custom hook like this:
In many case, I usually use both
toHaveBeenCalledTimes
andtoHaveBeenCalledWith
when test a function.But some functions are avoked more than 2 time, so
toHaveBeenNthCalledWith
has to be repeated with different args.This makes code longer. so i'm currently using custom hook like this:
So I think It would be cool that jest provide a matcher does these process. Is it possible to add matcher that test several avoke like this?
The text was updated successfully, but these errors were encountered: