Skip to content

Commit 2c7b703

Browse files
test(web): paint fake frames with a constant timestamp
The rAF spy in threadFindHighlights passed performance.now() to queued callbacks, which the no-wall-clock rule flags. The scheduler ignores the timestamp. Co-Authored-By: Claude Fable 5.1 <[email protected]>
1 parent a3a62f2 commit 2c7b703

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/web/src/components/chat/threadFindHighlights.browser.test.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ function setup() {
3131
act(() => {
3232
const pending = [...frames.values()];
3333
frames.clear();
34-
for (const callback of pending) callback(performance.now());
34+
// The timestamp is unused by the highlight scheduler; a constant keeps the paint deterministic.
35+
for (const callback of pending) callback(0);
3536
});
3637
stack.use(
3738
stubGlobal(

0 commit comments

Comments
 (0)