We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e71649d + b4d698e commit cf47cc2Copy full SHA for cf47cc2
README.md
@@ -58,10 +58,9 @@ import { Arg } from '@fluffy-spoon/substitute';
58
calculator.add(Arg.any(), 2).returns(10);
59
console.log(calculator.add(1337, 3)); //prints undefined since second argument doesn't match
60
console.log(calculator.add(1337, 2)); //prints 10 since second argument matches
61
-calculator.received().add(Arg.any(), 3); //will not throw since a call matches
62
63
-//ignoring arguments of specific type
64
-calculator.add(Arg.any('number'), 2).returns(10); //could also be 'array' or any string returned by the typeof operator
+//received call with first arg 1 and second arg less than 0
+calculator.received().add(1, Arg.is<number>(x => x < 0));
65
```
66
67
## What is this - black magic?
0 commit comments