Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(useMentionSource): update test to only reject memory tree recall

Steven Enamakel5395152ba60a
diff --git a/app/src/features/conversations/aui/useMentionSource.test.tsx b/app/src/features/conversations/aui/useMentionSource.test.tsx
index c096e562a3..9bc3d0b682 100644
--- a/app/src/features/conversations/aui/useMentionSource.test.tsx
+++ b/app/src/features/conversations/aui/useMentionSource.test.tsx
@@ -169,7 +169,12 @@ describe('useMentionSource', () => {
});
it('treats a failed recall as no memory hits', async () => {
- vi.mocked(callCoreRpc).mockRejectedValue(new Error('memory tree disabled'));
+ vi.mocked(callCoreRpc).mockImplementation(async request => {
+ if (request?.method === 'openhuman.memory_tree_recall') {
+ throw new Error('memory tree disabled');
+ }
+ return {} as never;
+ });
const { result } = setup();
act(() => result.current.aui.composer.setText('@roadmap'));
await waitFor(() => expect(callCoreRpc).toHaveBeenCalled());