import assert from "node:assert/strict"; import { readFileSync } from "node:fs"; import test from "node:test"; test("lazy load failures use a real page reload recovery", () => { const source = readFileSync(new URL("./ui/lazy-load-boundary.tsx", import.meta.url), "utf8"); assert.match(source, /window\.location\.reload\(\)/); assert.match(source, />\s*Reload\s* { const source = readFileSync(new URL("./sftp/SftpOverlays.tsx", import.meta.url), "utf8"); const loadingIndex = source.indexOf("const TextEditorModalLoading"); const suspenseFallbackIndex = source.indexOf(" { const source = readFileSync(new URL("./SettingsPage.tsx", import.meta.url), "utf8"); const errorFallbackIndex = source.indexOf("const SettingsTabLoadError"); const tabContentIndex = source.indexOf("", errorFallbackIndex); const boundaryFallbackIndex = source.indexOf("fallback={}"); assert.notEqual(errorFallbackIndex, -1); assert.notEqual(tabContentIndex, -1); assert.notEqual(boundaryFallbackIndex, -1); });