The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(coreRpcClient): update test mocks to use single core_rpc_endpoint command
Steven Enamakelda9f2a9131e2
diff --git a/app/src/services/__tests__/coreRpcClient.test.ts b/app/src/services/__tests__/coreRpcClient.test.tsindex 8c2e9b67d2..f348e7ffad 100644--- a/app/src/services/__tests__/coreRpcClient.test.ts+++ b/app/src/services/__tests__/coreRpcClient.test.ts@@ -465,8 +465,9 @@ describe('coreRpcClient', () => {vi.resetModules();vi.mocked(isTauri).mockReturnValue(true);vi.mocked(invoke).mockImplementation(async (cmd: string) => {- if (cmd === 'core_rpc_url') return 'http://127.0.0.1:7788/rpc';- if (cmd === 'core_rpc_token') return 'test-local-token';+ if (cmd === 'core_rpc_endpoint') {+ return { url: 'http://127.0.0.1:7788/rpc', token: 'test-local-token' };+ }throw new Error(`unexpected command: ${cmd}`);});const { callCoreRpc: callFreshCoreRpc } = await import('../coreRpcClient');@@ -487,8 +488,7 @@ describe('coreRpcClient', () => {vi.resetModules();vi.mocked(isTauri).mockReturnValue(true);vi.mocked(invoke).mockImplementation(async (cmd: string) => {- if (cmd === 'core_rpc_url') return 'http://127.0.0.1:7788/rpc';- if (cmd === 'core_rpc_token') throw new Error('denied');+ if (cmd === 'core_rpc_endpoint') throw new Error('denied');throw new Error(`unexpected command: ${cmd}`);});const { callCoreRpc: callFreshCoreRpc } = await import('../coreRpcClient');@@ -503,8 +503,7 @@ describe('coreRpcClient', () => {vi.resetModules();vi.mocked(isTauri).mockReturnValue(true);vi.mocked(invoke).mockImplementation(async (cmd: string) => {- if (cmd === 'core_rpc_url') return 'http://127.0.0.1:7788/rpc';- if (cmd === 'core_rpc_token') throw new Error('denied');+ if (cmd === 'core_rpc_endpoint') throw new Error('denied');throw new Error(`unexpected command: ${cmd}`);});const { callCoreRpc: callFreshCoreRpc } = await import('../coreRpcClient');@@ -518,7 +517,7 @@ describe('coreRpcClient', () => {const tokenCalls = vi.mocked(invoke)- .mock.calls.filter(([cmd]) => cmd === 'core_rpc_token').length;+ .mock.calls.filter(([cmd]) => cmd === 'core_rpc_endpoint').length;expect(tokenCalls).toBe(1);expect(fetch).not.toHaveBeenCalled();});