Skip to content

Commit f494475

Browse files
committed
fix tests
1 parent e74a04a commit f494475

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

apps/sim/executor/handlers/evaluator/evaluator-handler.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
import '@sim/testing/mocks/executor'
22

33
import { beforeEach, describe, expect, it, type Mock, vi } from 'vitest'
4+
5+
vi.mock('@/app/api/auth/oauth/utils', () => ({
6+
resolveOAuthAccountId: vi
7+
.fn()
8+
.mockResolvedValue({ accountId: 'test-vertex-credential-id', usedCredentialTable: false }),
9+
refreshTokenIfNeeded: vi
10+
.fn()
11+
.mockResolvedValue({ accessToken: 'mock-access-token', refreshed: false }),
12+
}))
13+
414
import { BlockType } from '@/executor/constants'
515
import { EvaluatorBlockHandler } from '@/executor/handlers/evaluator/evaluator-handler'
616
import type { ExecutionContext } from '@/executor/types'

apps/sim/executor/handlers/router/router-handler.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
import '@sim/testing/mocks/executor'
22

33
import { beforeEach, describe, expect, it, type Mock, vi } from 'vitest'
4+
5+
vi.mock('@/app/api/auth/oauth/utils', () => ({
6+
resolveOAuthAccountId: vi
7+
.fn()
8+
.mockResolvedValue({ accountId: 'test-vertex-credential-id', usedCredentialTable: false }),
9+
refreshTokenIfNeeded: vi
10+
.fn()
11+
.mockResolvedValue({ accessToken: 'mock-access-token', refreshed: false }),
12+
}))
13+
414
import { generateRouterPrompt, generateRouterV2Prompt } from '@/blocks/blocks/router'
515
import { BlockType } from '@/executor/constants'
616
import { RouterBlockHandler } from '@/executor/handlers/router/router-handler'

0 commit comments

Comments
 (0)