Fix websocket server functions and add an example (#4107)

* Fix websocket server function

* Add websocket test

* add a websocket example

* fix clippy
This commit is contained in:
Evan Almloff authored and GitHub committed 2025-05-14 08:28:43 +02:00
1 parent e47d0aa868
commit 6b70ba7cd2
10 files changed
+297 -12

No files matched your search

@@ -68,3 +68,11 @@ test("document elements", async ({ page }) => {
const main = page.locator("#main");
await expect(main).toHaveCSS("font-family", "Roboto");
});
test("websockets", async ({ page }) => {
await page.goto("http://localhost:3333");
// wait until the websocket div is mounted
const wsDiv = page.locator("div#websocket-div");
await expect(wsDiv).toHaveText("Received: HELLO WORLD");
});