Repository navigation
Commit 3247ed6
committed
test(webview): assert the unmount timer count before advancing timers
What: move the vi.getTimerCount() check to directly after unmount() in the
debounce unmount test, and document on LeadingEdgeDebounced<F> that suppressed
trailing calls return undefined.
Why: expired timers stop counting, so the old trailing assertion passed even
with scrollToBottomSmooth.clear() removed from the unmount cleanup; the type
also swallowed ReturnType<F> to undefined without saying so.
Impact: the unmount cleanup is now pinned, and the helper's return contract is
stated where callers read it.1 parent 4a98d64 commit 3247ed6
2 files changed
Lines changed: 7 additions & 1 deletion
File tree
- webview-ui/src
- hooks/__tests__
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
156 | 160 | | |
157 | 161 | | |
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
161 | | - | |
162 | 165 | | |
163 | 166 | | |
164 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
0 commit comments