Files
buzz/web/tests/e2e/bootstrap.spec.ts
Logan Johnson 091670ff77 fix(e2e): close bootstrap checker receiver gaps
Preserve unsafe bootstrap events through supported parenthesized forms and grant loop bootstrap credit only when syntax proves an enumerable runtime iteration.

Co-authored-by: Larry <larry@buzz.local>
Co-authored-by: Brother Darryl <darryl@buzz.local>
Signed-off-by: Logan Johnson <loganj@squareup.com>
2026-08-21 00:34:00 +00:00

21 lines
736 B
TypeScript

import { expect, test, bootstrapE2ePage } from "../helpers/test";
import { E2E_APP_ORIGIN } from "../helpers/bootstrap";
test.beforeEach(async ({ page }) => {
await bootstrapE2ePage(page);
});
test("starts each test at the app origin after explicit bootstrap", async ({
page,
}) => {
expect(new URL(page.url()).origin).toBe(E2E_APP_ORIGIN);
});
test("reports a failed initial navigation at its source", async ({ page }) => {
await expect(
bootstrapE2ePage(page, { expectedOrigin: "http://127.0.0.1:1" }),
).rejects.toThrow(
/E2E app navigation did not commit to http:\/\/127\.0\.0\.1:1 \(current URL: http:\/\/127\.0\.0\.1:4173\/\).*Run pnpm test:e2e:smoke or run pnpm build and check the preview server/,
);
});