Skip to content

Commit ef7384d

Browse files
committed
test(mothership): assert the omitted selection on the serialized worker request
1 parent 306a8d0 commit ef7384d

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎apps/sim/lib/mothership/chat/post.test.ts‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -831,12 +831,10 @@ describe('handleUnifiedChatPost', () => {
831831
})
832832
)
833833
expect(response.status).toBe(200)
834-
const params = buildCopilotRequestPayload.mock.lastCall?.[0] as Record<string, unknown>
835-
expect(params?.effort).toBe(expected)
836-
expect(params?.modelSelection).toBeUndefined()
837-
expect(startCopilotOtelRoot.mock.results.at(-1)?.value.setRequestShape).toHaveBeenCalledWith(
838-
expect.objectContaining({ model: undefined })
839-
)
834+
const { requestPayload } = createSSEStream.mock.lastCall?.[0] ?? {}
835+
const wire = JSON.parse(JSON.stringify(requestPayload))
836+
expect(wire.effort).toBe(expected)
837+
expect(wire).not.toHaveProperty('modelSelection')
840838
}
841839
)
842840

0 commit comments

Comments
 (0)