From a78aa6927bc6a9820aaec918c55485c9ca0c8ff4 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Thu, 24 Sep 2026 23:43:57 -0500 Subject: [PATCH] test(desktop): give the relay test's plugin-sdk mock an atom The cold-open mark lives in ./shared, which relay.ts imports since main's relay drain change, so the mock must export atom like its neighbours. --- apps/desktop/src/plugins/hermes-bots/relay.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/plugins/hermes-bots/relay.test.ts b/apps/desktop/src/plugins/hermes-bots/relay.test.ts index dd66dbd4f8..63088b7cc6 100644 --- a/apps/desktop/src/plugins/hermes-bots/relay.test.ts +++ b/apps/desktop/src/plugins/hermes-bots/relay.test.ts @@ -54,7 +54,12 @@ const { clearBotAttentionMock, hostMock, noteBotAttentionMock, UnboundedCache } } })) -vi.mock('@hermes/plugin-sdk', () => ({ host: hostMock, LruCache: UnboundedCache })) +// relay.ts imports ./shared, which holds the $pendingBotOpen atom. +vi.mock('@hermes/plugin-sdk', async () => { + const { atom } = await import('nanostores') + + return { atom, host: hostMock, LruCache: UnboundedCache } +}) vi.mock('./data', () => ({ botHandle: (name: string) => (name === 'default' ? 'hermes' : name),