Skip to content

Commit 1bf17e9

Browse files
committed
test(web): wait for highlighted code with vi.waitFor
1 parent ba7e983 commit 1bf17e9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/web/src/components/ChatMarkdown.browser.test.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,10 @@ it("highlights a code block's own source when an earlier block of the same lengt
284284
const second = 'const commitSha = "cb06f8d135b3";';
285285
{
286286
await using screen = await renderText(`\`\`\`ts\n${first}\n\`\`\``);
287-
await expect.poll(() => highlightedText(screen.container)).toBe(first);
287+
await vi.waitFor(() => expect(highlightedText(screen.container)).toBe(first));
288288
}
289289
await using screen = await renderText(`\`\`\`ts\n${second}\n\`\`\``);
290-
await expect.poll(() => highlightedText(screen.container)).toBe(second);
290+
await vi.waitFor(() => expect(highlightedText(screen.container)).toBe(second));
291291
});
292292

293293
describe("ChatMarkdown favicon privacy", () => {

0 commit comments

Comments
 (0)