fix: stabilize useQuery mock reference to prevent infinite re-render loop in AgentOutputViewer test
This commit is contained in:
@@ -5,10 +5,11 @@ import { vi, describe, it, expect, beforeEach } from 'vitest'
|
||||
import * as parseModule from '@/lib/parse-agent-output'
|
||||
import { AgentOutputViewer } from './AgentOutputViewer'
|
||||
|
||||
const EMPTY_CHUNKS: never[] = []
|
||||
vi.mock('@/lib/trpc', () => ({
|
||||
trpc: {
|
||||
getAgentOutput: {
|
||||
useQuery: vi.fn(() => ({ data: [], isLoading: false })),
|
||||
useQuery: vi.fn(() => ({ data: EMPTY_CHUNKS, isLoading: false })),
|
||||
},
|
||||
onAgentOutput: {
|
||||
useSubscription: vi.fn(),
|
||||
|
||||
Reference in New Issue
Block a user