Skip to content

Commit

Permalink
chore: Fix flaky test (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
just-boris authored Feb 19, 2025
1 parent 02617e9 commit f58bfa8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/compare-images.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ test(
test(
'should compare viewport screenshots',
setupTest(async (page, browser) => {
await page.waitForJsTimers(200);
const firstResult = await page.captureViewport();
await browser.refresh();
await page.waitForJsTimers(200);
const secondResult = await page.captureViewport();
await expect(cropAndCompare(firstResult, secondResult)).resolves.toEqual({
firstImage: expect.any(Buffer),
Expand Down

0 comments on commit f58bfa8

Please sign in to comment.