(page: Page, type: "client" | "server")
| 3 | // High level tests; more nuanced scenarios are covered by unit tests |
| 4 | test.describe("layout-shift", () => { |
| 5 | async function assertRenderedBy(page: Page, type: "client" | "server") { |
| 6 | const innerHTML = await page.evaluate(() => document.body.innerHTML); |
| 7 | expect(innerHTML).toContain( |
| 8 | type === "client" ? "<!-- CLIENT MARKER -->" : "<!-- SERVER MARKER -->" |
| 9 | ); |
| 10 | } |
| 11 | |
| 12 | test.describe("client-rendered apps", () => { |
| 13 | const HOST = "http://localhost:3012"; |