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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user