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.
This commit is contained in:
Hermes Agent
2026-09-24 23:43:57 -05:00
committed by brooklyn!
parent 761ad9639f
commit a78aa6927b

View File

@@ -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),