Skip to content

Commit 535b25c

Browse files
committed
chore: Fix flaky test
1 parent 02617e9 commit 535b25c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/compare-images.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ test(
4545
test(
4646
'should compare viewport screenshots',
4747
setupTest(async (page, browser) => {
48+
await page.waitForJsTimers();
4849
const firstResult = await page.captureViewport();
4950
await browser.refresh();
51+
await page.waitForJsTimers();
5052
const secondResult = await page.captureViewport();
5153
await expect(cropAndCompare(firstResult, secondResult)).resolves.toEqual({
5254
firstImage: expect.any(Buffer),

0 commit comments

Comments
 (0)