diff --git a/tests/component/boot-unexpected-failure.test.tsx b/tests/component/boot-unexpected-failure.test.tsx index 9da395bb..f5800893 100644 --- a/tests/component/boot-unexpected-failure.test.tsx +++ b/tests/component/boot-unexpected-failure.test.tsx @@ -1,7 +1,7 @@ // @vitest-environment jsdom import { render, screen, within } from "@testing-library/react"; -import { describe, expect, it, vi } from "vitest"; +import { afterEach, describe, expect, it, vi } from "vitest"; import { BootErrorShell } from "../../src/presentation/boundaries/boot-error-shell.tsx"; @@ -16,6 +16,12 @@ vi.mock("../../src/bootstrap/create-runtime-composition.ts", () => ({ }, })); +// The reportError stub must not reach the next test in this file; the config +// does not set unstubGlobals. +afterEach(() => { + vi.unstubAllGlobals(); +}); + describe("unexpected boot failure (09-04)", () => { it("is shown as BOOT_UNEXPECTED_FAILURE and reports the error in development", async () => { document.body.innerHTML =