Commit 4e94fcb
committed
Fix issue with
- `.mockReset()` should not be called in spies since it calls `.mockClear()` and returns the implementation to its **initial** form. In this case it was silencing some of the `act` related warnings emitted by `@testing-library/react` which needed to be resolved since they were calling issues. So `.mockReset()` calls on spies need to be changed to `.mockRestore()` calls since `.mockRestore()` restores the implementation to its **original** form.console spy inside buildHooks.test.tsx
1 parent 7de16ef commit 4e94fcb
1 file changed
+8
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
967 | 967 | | |
968 | 968 | | |
969 | 969 | | |
970 | | - | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
971 | 973 | | |
972 | | - | |
973 | | - | |
| 974 | + | |
| 975 | + | |
974 | 976 | | |
975 | 977 | | |
976 | | - | |
977 | | - | |
| 978 | + | |
| 979 | + | |
978 | 980 | | |
979 | 981 | | |
980 | 982 | | |
| |||
0 commit comments