Skip to content

Commit 8e4ec49

Browse files
committed
fix(ci): load the real CLI router before test execution
1 parent c43a2b4 commit 8e4ec49

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎apps/sim/lib/mothership/agent-cli/services.test.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ import { executeAgentCliService } from '@/lib/mothership/agent-cli/services'
3232
import type { AgentCliRequest } from '@/lib/mothership/generated/agent-cli'
3333
import { executeSimCli } from '@/lib/mothership/tools/handlers/sim-cli'
3434

35+
const { routeExecution: actualRouteExecution } = await vi.importActual<
36+
typeof import('@/lib/mothership/tools/server/router')
37+
>('@/lib/mothership/tools/server/router')
38+
3539
const boundary = {
3640
...hoisted,
3741
workspace: mothershipWorkspaceTargetMockFns.mockResolveInvocationWorkspace,
@@ -200,10 +204,7 @@ describe('scoped CLI service adapter', () => {
200204
] as const)(
201205
'returns actionable canonical %s input errors through the real router',
202206
async (name, input, field, constraint) => {
203-
const { routeExecution } = await vi.importActual<
204-
typeof import('@/lib/mothership/tools/server/router')
205-
>('@/lib/mothership/tools/server/router')
206-
boundary.route.mockImplementationOnce(routeExecution)
207+
boundary.route.mockImplementationOnce(actualRouteExecution)
207208
const result = await executeSimCli(
208209
{ request: service(name, input) },
209210
{ ...organization, workflowId: '' }

0 commit comments

Comments
 (0)