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
fix(test): move test files to correct location
Steven Enamakel489bff820d82
diff --git a/app/src/utils/__tests__/tauriCommandsMemory.test.ts b/app/src/utils/__tests__/tauriCommandsMemory.test.tsindex 73107ee7e7..7fa60dff3b 100644--- a/app/src/utils/__tests__/tauriCommandsMemory.test.ts+++ b/app/src/utils/__tests__/tauriCommandsMemory.test.ts@@ -23,9 +23,10 @@ vi.mock('../../services/coreRpcClient', () => ({}));describe('memoryGraphQuery', () => {- it('throws when not running in Tauri', async () => {+ it('calls core RPC when not running in Tauri', async () => {mockIsTauri.mockReturnValue(false);- await expect(memoryGraphQuery()).rejects.toThrow('Not running in Tauri');+ mockCallCoreRpc.mockResolvedValue([]);+ await memoryGraphQuery();});it('calls core RPC with memory.graph.query method and optional params', async () => {@@ -69,11 +70,10 @@ describe('memoryGraphQuery', () => {});describe('memoryDocIngest', () => {- it('throws when not running in Tauri', async () => {+ it('calls core RPC when not running in Tauri', async () => {mockIsTauri.mockReturnValue(false);- await expect(- memoryDocIngest({ namespace: 'ns', key: 'k', title: 't', content: 'c' })- ).rejects.toThrow('Not running in Tauri');+ mockCallCoreRpc.mockResolvedValue([]);+ await memoryDocIngest({ namespace: 'ns', key: 'k', title: 't', content: 'c' });});it('calls core RPC with memory.doc.ingest and forwards all params', async () => {diff --git a/app/src/utils/tauriCommands/__tests__/config.test.ts b/app/src/utils/tauriCommands/__tests__/config.test.tsindex 9fdc55bae6..cc57f0f905 100644--- a/app/src/utils/tauriCommands/__tests__/config.test.ts+++ b/app/src/utils/tauriCommands/__tests__/config.test.ts@@ -21,10 +21,11 @@ describe('openhumanGetClientConfig', () => {vi.resetAllMocks();});- it('throws when not running inside the Tauri shell', async () => {+ it('calls core RPC outside the Tauri shell', async () => {const { isTauri } = await import('../common');vi.mocked(isTauri).mockReturnValueOnce(false);- await expect(openhumanGetClientConfig()).rejects.toThrow(/Not running in Tauri/i);+ vi.mocked(callCoreRpc).mockResolvedValueOnce({} as never);+ await openhumanGetClientConfig();});it('dispatches openhuman.inference_get_client_config and returns the response', async () => {@@ -87,9 +88,10 @@ describe('Claude Code wrappers', () => {['openhumanClaudeCodeAuthStatus', () => openhumanClaudeCodeAuthStatus()],['openhumanClaudeCodeSettings', () => openhumanClaudeCodeSettings()],['openhumanClaudeCodeSetFullAccess', () => openhumanClaudeCodeSetFullAccess(true)],- ])('%s throws outside the Tauri shell', async (_name, call) => {+ ])('%s calls core RPC outside the Tauri shell', async (_name, call) => {const { isTauri } = await import('../common');vi.mocked(isTauri).mockReturnValueOnce(false);- await expect(call()).rejects.toThrow(/Not running in Tauri/i);+ vi.mocked(callCoreRpc).mockResolvedValueOnce({} as never);+ await call();});});diff --git a/app/src/utils/tauriCommands/memory.test.ts b/app/src/utils/tauriCommands/memory.test.tsindex b8515c2feb..b981a6d7ec 100644--- a/app/src/utils/tauriCommands/memory.test.ts+++ b/app/src/utils/tauriCommands/memory.test.ts@@ -19,10 +19,11 @@ beforeEach(() => {});describe('memorySyncChannel', () => {- test('throws when not in Tauri', async () => {+ test('calls core RPC outside Tauri', async () => {mockIsTauri.mockReturnValue(false);- await expect(memorySyncChannel('ch-1')).rejects.toThrow('Not running in Tauri');- expect(mockCallCoreRpc).not.toHaveBeenCalled();+ mockCallCoreRpc.mockResolvedValue({});+ await memorySyncChannel('ch-1');+ expect(mockCallCoreRpc).toHaveBeenCalled();});test('calls memory_sync_channel with correct channel_id', async () => {@@ -40,9 +41,10 @@ describe('memorySyncChannel', () => {});describe('memorySyncAll', () => {- test('throws when not in Tauri', async () => {+ test('calls core RPC outside Tauri', async () => {mockIsTauri.mockReturnValue(false);- await expect(memorySyncAll()).rejects.toThrow('Not running in Tauri');+ mockCallCoreRpc.mockResolvedValue({});+ await memorySyncAll();});test('calls memory_sync_all and returns result', async () => {@@ -56,9 +58,10 @@ describe('memorySyncAll', () => {});describe('memoryLearnAll', () => {- test('throws when not in Tauri', async () => {+ test('calls core RPC outside Tauri', async () => {mockIsTauri.mockReturnValue(false);- await expect(memoryLearnAll()).rejects.toThrow('Not running in Tauri');+ mockCallCoreRpc.mockResolvedValue({});+ await memoryLearnAll();});test('calls memory_learn_all without namespaces param when none provided', async () => {@@ -145,8 +148,9 @@ describe('aiListMemoryFiles', () => {expect(await aiListMemoryFiles()).toEqual([]);});- test('throws when not running in Tauri', async () => {+ test('calls core RPC when not running in Tauri', async () => {mockIsTauri.mockReturnValue(false);- await expect(aiListMemoryFiles()).rejects.toThrow(/Not running in Tauri/);+ mockCallCoreRpc.mockResolvedValue({});+ await aiListMemoryFiles();});});diff --git a/app/src/utils/tauriCommands/taskSources.test.ts b/app/src/utils/tauriCommands/taskSources.test.tsindex 71e64e3f97..d9edb75239 100644--- a/app/src/utils/tauriCommands/taskSources.test.ts+++ b/app/src/utils/tauriCommands/taskSources.test.ts@@ -136,22 +136,19 @@ describe('tauriCommands/taskSources', () => {expect(mockCallCoreRpc).toHaveBeenCalledWith({ method: 'openhuman.task_sources_status' });});- test('every wrapper throws and skips RPC when not in Tauri', async () => {+ test('every wrapper calls core RPC when not in Tauri', async () => {mockIsTauri.mockReturnValue(false);- await expect(openhumanTaskSourcesList()).rejects.toThrow('Not running in Tauri');- await expect(openhumanTaskSourcesGet('x')).rejects.toThrow('Not running in Tauri');- await expect(- openhumanTaskSourcesAdd({ provider: 'github', filter: { provider: 'github' } })- ).rejects.toThrow('Not running in Tauri');- await expect(openhumanTaskSourcesUpdate('x', {})).rejects.toThrow('Not running in Tauri');- await expect(openhumanTaskSourcesRemove('x')).rejects.toThrow('Not running in Tauri');- await expect(openhumanTaskSourcesFetch('x')).rejects.toThrow('Not running in Tauri');- await expect(openhumanTaskSourcesSync()).rejects.toThrow('Not running in Tauri');- await expect(openhumanTaskSourcesListTasks('x')).rejects.toThrow('Not running in Tauri');- await expect(- openhumanTaskSourcesPreviewFilter('github', { provider: 'github' })- ).rejects.toThrow('Not running in Tauri');- await expect(openhumanTaskSourcesStatus()).rejects.toThrow('Not running in Tauri');- expect(mockCallCoreRpc).not.toHaveBeenCalled();+ mockCallCoreRpc.mockResolvedValue({});+ await openhumanTaskSourcesList();+ await openhumanTaskSourcesGet('x');+ await openhumanTaskSourcesAdd({ provider: 'github', filter: { provider: 'github' } });+ await openhumanTaskSourcesUpdate('x', {});+ await openhumanTaskSourcesRemove('x');+ await openhumanTaskSourcesFetch('x');+ await openhumanTaskSourcesSync();+ await openhumanTaskSourcesListTasks('x');+ await openhumanTaskSourcesPreviewFilter('github', { provider: 'github' });+ await openhumanTaskSourcesStatus();+ expect(mockCallCoreRpc).toHaveBeenCalled();});});