Skip to content

Commit 9a866d0

Browse files
authored
Update MockFunctions.md
1 parent 7bd3bb7 commit 9a866d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/MockFunctions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ const result = [11, 12].filter(num => filterTestFn(num));
106106
console.log(result);
107107
// > [11]
108108
console.log(filterTestFn.mock.calls[0][0]); // 11
109-
console.log(filterTestFn.mock.calls[0][1]); // 12
109+
console.log(filterTestFn.mock.calls[1][0]); // 12
110110
```
111111

112112
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.

0 commit comments

Comments
 (0)