Commit 9ea7b2f
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 1e02320 commit 9ea7b2f
1 file changed
+8
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | | - | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
1120 | 1120 | | |
1121 | 1121 | | |
1122 | 1122 | | |
1123 | | - | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
1124 | 1126 | | |
1125 | | - | |
1126 | | - | |
| 1127 | + | |
| 1128 | + | |
1127 | 1129 | | |
1128 | 1130 | | |
1129 | | - | |
1130 | | - | |
| 1131 | + | |
| 1132 | + | |
1131 | 1133 | | |
1132 | 1134 | | |
1133 | 1135 | | |
| |||
0 commit comments