Files
PaperClipAI/ui/src
Priya RamanandPaperclip 834f33c31b test(ui): flush passive effects with React act in CompanySkills tests
The local act helper wrapped flushSync, which flushes render work but
not passive effects. The install dialog seeds its state in a useEffect,
so tests added a setTimeout(0) hop to give it a chance to run. A
setTimeout callback and React's own scheduler task queue in a
different order each run, so the hop sometimes lost the race and the
test read stale state.

Delegate the helper to React's own act, which flushes passive effects
before it resolves, and remove the now-unneeded timing hops.

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-09-05 08:07:54 +00:00
..