Skip to content
This repository was archived by the owner on Jul 24, 2025. It is now read-only.

Commit e22f786

Browse files
chore: fix flaky test (#71)
Co-authored-by: Arnaud Barré <arnaud.barre72@gmail.com>
1 parent 85892b3 commit e22f786

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

playground/shadow-export/__tests__/shadow-export.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import { expect, test } from "@playwright/test";
2-
import { setupDevServer } from "../../utils";
2+
import { setupDevServer, setupWaitForLogs } from "../../utils";
33

44
test("Shadow export HMR", async ({ page }) => {
55
const { testUrl, server, editFile } = await setupDevServer("shadow-export");
6+
const waitForLogs = await setupWaitForLogs(page);
67
await page.goto(testUrl);
8+
await waitForLogs("[vite] connected.");
9+
await expect(page.locator("body")).toHaveText("Shadow export");
710

811
editFile("src/App.tsx", ["Shadow export", "Shadow export updates!"]);
912
await expect(page.locator("body")).toHaveText("Shadow export updates!");

0 commit comments

Comments
 (0)