The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(desktop): type the fresh-module MCP health import without an import() annotation
teknium1d747a71df23d
diff --git a/apps/desktop/src/store/mcp-health.test.ts b/apps/desktop/src/store/mcp-health.test.tsindex c4e8dd9b8c0..2326f5c10a0 100644--- a/apps/desktop/src/store/mcp-health.test.ts+++ b/apps/desktop/src/store/mcp-health.test.ts@@ -78,6 +78,9 @@ afterEach(() => {mocks.setMcpServerEnabled.mockClear()})+type McpHealthModule = Awaited<ReturnType<typeof importMcpHealth>>+const importMcpHealth = () => import('./mcp-health')+describe('shouldNotify', () => {const DAY = 24 * 60 * 60 * 1000const now = 1_000_000@@ -164,7 +167,7 @@ it('honors a persisted snooze in a fresh module session, then re-notifies afterlet clock = 1_700_000_000_000const until = clock + 24 * 60 * 60 * 1000const nowSpy = vi.spyOn(Date, 'now').mockImplementation(() => clock)- let freshSession: typeof import('./mcp-health') | undefined+ let freshSession: McpHealthModule | undefinedtry {window.localStorage.setItem(key, String(until))@@ -173,7 +176,7 @@ it('honors a persisted snooze in a fresh module session, then re-notifies after// A fresh import drops in-memory transition state, as a renderer restart does.vi.resetModules()- freshSession = await import('./mcp-health')+ freshSession = await importMcpHealth()freshSession.startMcpHealthChecker()mocks.gatewayState.set('open')await flush()