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(tests): add unit tests for conversation rendering and thread slice
Steven Enamakeleb3e7358f016
diff --git a/app/src/pages/__tests__/Conversations.render.test.tsx b/app/src/pages/__tests__/Conversations.render.test.tsxindex e557031119..577aa5d93a 100644--- a/app/src/pages/__tests__/Conversations.render.test.tsx+++ b/app/src/pages/__tests__/Conversations.render.test.tsx@@ -16,7 +16,12 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';import { SidebarSlotOutlet, SidebarSlotProvider } from '../../components/layout/shell/SidebarSlot';import { threadApi } from '../../services/api/threadApi';-import { chatCancel, chatRemoveQueueItem, chatSend, chatSendWithAck } from '../../services/chatService';+import {+ chatCancel,+ chatRemoveQueueItem,+ chatSend,+ chatSendWithAck,+} from '../../services/chatService';import { CoreRpcError } from '../../services/coreRpcClient';import chatRuntimeReducer, {beginInferenceTurn,@@ -2556,7 +2561,9 @@ describe('Conversations — queued follow-ups while a turn streams', () => {});await waitFor(() => {- expect(chatSendWithAck).toHaveBeenCalledWith(expect.objectContaining({ queueMode: 'followup' }));+ expect(chatSendWithAck).toHaveBeenCalledWith(+ expect.objectContaining({ queueMode: 'followup' })+ );});await waitFor(() =>expect(@@ -2579,7 +2586,9 @@ describe('Conversations — queued follow-ups while a turn streams', () => {});await waitFor(() => {- expect(chatSendWithAck).toHaveBeenCalledWith(expect.objectContaining({ queueMode: 'followup' }));+ expect(chatSendWithAck).toHaveBeenCalledWith(+ expect.objectContaining({ queueMode: 'followup' })+ );});});diff --git a/app/src/store/__tests__/threadSlice.test.ts b/app/src/store/__tests__/threadSlice.test.tsindex 3ae0c924cd..0066a2dad6 100644--- a/app/src/store/__tests__/threadSlice.test.ts+++ b/app/src/store/__tests__/threadSlice.test.ts@@ -90,10 +90,16 @@ describe('threadSlice synchronous reducers', () => {it('deletes a thread from legacy persisted state without channel activity', () => {const current = threadReducer(undefined, { type: '@@test/init' });- const legacyState = { ...current, channelActivityByThreadId: undefined } as unknown as typeof current;+ const legacyState = {+ ...current,+ channelActivityByThreadId: undefined,+ } as unknown as typeof current;expect(() =>- threadReducer(legacyState, deleteThread.fulfilled({ threadId: 't-legacy' }, 'request-1', 't-legacy'))+ threadReducer(+ legacyState,+ deleteThread.fulfilled({ threadId: 't-legacy' }, 'request-1', 't-legacy')+ )).not.toThrow();});