Commit 24d8ad9
test: stop the watch debounce test asserting CI disk speed
CI failed on 'collapses rapid saves into a single push' with two pushes
instead of one. Not a bug in the debounce: three awaited writes with a
120 ms window can legitimately straddle it on a loaded runner, so the test
was asserting something about the machine rather than the code. It now uses
synchronous writes and a 1000 ms window.
The shared debounce also rises from 20 ms to 150 ms. chokidar sometimes
emits add and change for a single write, and at 20 ms that pair can span
the window and produce a second push — a rare failure that only appears
under load. Costs about a second across the suite.
One assertion changes from waiting for the count to equal 1 to waiting for
at least 1 and checking the total after settling, so a double push fails
with '2 !== 1' rather than an unexplained timeout.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent dee20c8 commit 24d8ad9
1 file changed
Lines changed: 19 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | | - | |
39 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
40 | 46 | | |
41 | 47 | | |
42 | 48 | | |
| |||
133 | 139 | | |
134 | 140 | | |
135 | 141 | | |
136 | | - | |
| 142 | + | |
137 | 143 | | |
138 | 144 | | |
139 | 145 | | |
| |||
166 | 172 | | |
167 | 173 | | |
168 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
169 | 179 | | |
170 | | - | |
| 180 | + | |
171 | 181 | | |
172 | | - | |
173 | | - | |
174 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
175 | 186 | | |
176 | | - | |
| 187 | + | |
177 | 188 | | |
178 | 189 | | |
179 | 190 | | |
| |||
0 commit comments