// @vitest-environment jsdom import { render, screen, within } from "@testing-library/react"; import { afterEach, describe, expect, it, vi } from "vitest"; import { BootErrorShell } from "../../src/presentation/boundaries/boot-error-shell.tsx"; // 09-04. An assembly defect (here the TypeError a missing feature capability // used to produce) was shown as BOOT_CONFIG_FAILURE and the error was dropped. const assemblyDefect = new TypeError( "Cannot read properties of undefined (reading 'get')", ); vi.mock("../../src/bootstrap/create-runtime-composition.ts", () => ({ createRuntimeComposition: async () => { throw assemblyDefect; }, })); // 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 = '