Repository navigation
Commit b033699
committed
test(cli): the watch-mode --icons-specifier test touches the theme atomically
A rebuild reads the theme twice: it loads the module, then scans its source
for the icon import. The test's re-touch was an in-place writeFileSync,
which truncates first, so a re-touch landing between those two reads gave a
rebuild an empty source to scan; with the test's empty icon registry that
build exits 0 with the new token and no import line, and the poll accepted
it. Each touch is now staged in a sibling file and renamed over the theme,
as an editor's atomic save does (the watcher follows renames). The comment
above the snapshot names the real race: theme build renames its outputs
into place, so a read of the module was never half-written.1 parent 7a9c932 commit b033699
1 file changed
Lines changed: 18 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
328 | 338 | | |
329 | 339 | | |
330 | 340 | | |
| |||
334 | 344 | | |
335 | 345 | | |
336 | 346 | | |
337 | | - | |
| 347 | + | |
338 | 348 | | |
339 | 349 | | |
340 | | - | |
| 350 | + | |
341 | 351 | | |
342 | 352 | | |
343 | 353 | | |
| |||
0 commit comments