Skip to content

Commit

Permalink
docs(mocktail): update verify example in README.md (#215)
Browse files Browse the repository at this point in the history
Co-authored-by: Felix Angelov <felangelov@gmail.com>
  • Loading branch information
woolfred and felangel authored Dec 15, 2023
1 parent 95d69b8 commit cee5c5f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/mocktail/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,14 @@ cat.sound();
// Verify the interaction occurred.
verify(() => cat.sound()).called(1);
// When mocktail verifies an invocation, it is then excluded from further verifications.
verifyNever(() => cat.sound());
// Interact with the mock instance again.
cat.sound();
// Verify the interaction occurred twice.
verify(() => cat.sound()).called(2);
// The verification count is 1 since there was only 1 invocation since the last verification.
verify(() => cat.sound()).called(1);
```

## Additional Usage
Expand Down

0 comments on commit cee5c5f

Please sign in to comment.