Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix tests
  • Loading branch information
Sg312 committed Aug 7, 2025
commit 4daacc798e2e488ddac257b46efbe0e19347689a
13 changes: 12 additions & 1 deletion apps/sim/app/api/copilot/methods/route.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,14 @@ describe('Copilot Methods API Route', () => {
86400
)
expect(mockRedisGet).toHaveBeenCalledWith('tool_call:tool-call-123')
expect(mockToolRegistryExecute).toHaveBeenCalledWith('interrupt-tool', { key: 'value' })
expect(mockToolRegistryExecute).toHaveBeenCalledWith('interrupt-tool', {
key: 'value',
confirmationMessage: 'User approved',
fullData: {
message: 'User approved',
status: 'accepted',
}
})
})

it('should handle tool execution with interrupt - user rejection', async () => {
Expand Down Expand Up @@ -613,6 +620,10 @@ describe('Copilot Methods API Route', () => {
expect(mockToolRegistryExecute).toHaveBeenCalledWith('no_op', {
existing: 'param',
confirmationMessage: 'Confirmation message',
fullData: {
message: 'Confirmation message',
status: 'accepted',
}
})
})

Expand Down
Loading