Skip to content

Commit b269cca

Browse files
committed
test(mothership): read the serialized request without a JSON round trip
1 parent ef7384d commit b269cca

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -832,9 +832,8 @@ describe('handleUnifiedChatPost', () => {
832832
)
833833
expect(response.status).toBe(200)
834834
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')
835+
expect(requestPayload?.effort).toBe(expected)
836+
expect(JSON.stringify(requestPayload)).not.toContain('modelSelection')
838837
}
839838
)
840839

0 commit comments

Comments
 (0)