Skip to content

Commit 5cd6cc1

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
test(chat): use shared async helper
1 parent 03faf26 commit 5cd6cc1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* @vitest-environment jsdom
33
*/
44
import { act, type ReactNode } from 'react'
5+
import { sleep } from '@sim/utils/helpers'
56
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
67
import { createRoot, type Root } from 'react-dom/client'
78
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
@@ -609,7 +610,7 @@ describe('useWorkflowExecution attachment uploads', () => {
609610
blockExecutionId: 'invoke-streamed',
610611
chunk: 'streamed answer',
611612
})
612-
await new Promise((resolve) => setTimeout(resolve, 0))
613+
await sleep(0)
613614
await options.callbacks?.onBlockCompleted?.({
614615
blockId: 'agent-1',
615616
blockExecutionId: 'invoke-streamed',

0 commit comments

Comments
 (0)