Skip to content

Commit

Permalink
docs(mocktail): adjust README.md snippet for any(that: ...)
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel committed Jan 19, 2024
1 parent ca9f35e commit d4df7d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/mocktail/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ expect(cat.likes('fish', isHungry: false), isTrue);
// You can verify the interaction for specific arguments.
verify(() => cat.likes('fish', isHungry: false)).called(1);
verify(() => cat.likes(any(that: isA<Food>().having((food) => food.name, 'name', 'Fish')))).called(1);
// Or alternatively use any(that: ...) to use a matcher.
verify(() => cat.likes(any(that: isA<String>().having((food) => food, 'name', 'fish')))).called(1);
// You can stub a method using argument matcher: `any`.
// When stubbing a positional argument, use `any()`.
Expand Down

0 comments on commit d4df7d2

Please sign in to comment.