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

toHaveReceivedNthCommandWith for specific commands. #145

Closed
sander-b-postnl opened this issue Feb 14, 2023 · 0 comments · Fixed by #146
Closed

toHaveReceivedNthCommandWith for specific commands. #145

sander-b-postnl opened this issue Feb 14, 2023 · 0 comments · Fixed by #146
Labels
enhancement New feature or request

Comments

@sander-b-postnl
Copy link
Contributor

Problem

While running the toHaveReceivedNthCommand you have to take the other commands into account.

Example:

  1. PutItemCommand
  2. QueryCommand
  3. TransactWriteItemsCommand
  4. PutItemCommand

I expect that toHaveReceivedNthCommand(2, PutItemCommand) checks the second occurrence of the PutItemCommand not the second occurrence of all the calls, which is in this case the QueryCommand.

Solution

Implement a new matcher toHaveReceivedNthSpecificCommandWith that only checks the call occurrence for the specified command.

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

Successfully merging a pull request may close this issue.

1 participant