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
Imagine I have a database repository and I want to mock a getById(id: string): User function for multiple users. I could of course do that for every user, but since callback give us access to args, we could do it dynamically:
repoMock.setup(repo=>repo.getById('user_1')).callback(({ args })=>({id: args[0],// ...some other props}))
Since args are of type any[], there is no type-safety in reading them, so it would be nice if we could do that the same way as it is for It.Is<T>
Feature request
Make callback accept a generic argument to type the the args returned in the
Expression
The text was updated successfully, but these errors were encountered: