Commit 4beb3f6
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 4ab36d0 commit 4beb3f6
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 | | |
| |||
959 | 959 | | |
960 | 960 | | |
961 | 961 | | |
962 | | - | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
963 | 965 | | |
964 | | - | |
965 | | - | |
| 966 | + | |
| 967 | + | |
966 | 968 | | |
967 | 969 | | |
968 | | - | |
969 | | - | |
| 970 | + | |
| 971 | + | |
970 | 972 | | |
971 | 973 | | |
972 | 974 | | |
| |||
0 commit comments