Skip to content

Commit

Permalink
Update MockFunctions.md
Browse files Browse the repository at this point in the history
  • Loading branch information
seastian committed Jun 19, 2021
1 parent 7bd3bb7 commit 9a866d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/MockFunctions.md
Expand Up @@ -106,7 +106,7 @@ const result = [11, 12].filter(num => filterTestFn(num));
console.log(result);
// > [11]
console.log(filterTestFn.mock.calls[0][0]); // 11
console.log(filterTestFn.mock.calls[0][1]); // 12
console.log(filterTestFn.mock.calls[1][0]); // 12
```

Most real-world examples actually involve getting ahold of a mock function on a dependent component and configuring that, but the technique is the same. In these cases, try to avoid the temptation to implement logic inside of any function that's not directly being tested.
Expand Down

0 comments on commit 9a866d0

Please sign in to comment.