Skip to content

Commit 07cfc57

Browse files
committed
test(mothership): assert reported outcomes, not incidental mock calls
1 parent 74858f1 commit 07cfc57

3 files changed

Lines changed: 0 additions & 6 deletions

File tree

‎apps/sim/lib/mothership/request/tools/executor.test.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -917,12 +917,10 @@ describe('watchdog completion provenance', () => {
917917

918918
await failPendingToolCall(toolCall.id, context, execContext)
919919

920-
expect(completeAsyncToolCall).not.toHaveBeenCalled()
921920
expect(toolCall.result).toEqual({
922921
success: false,
923922
output: { error: expect.stringContaining('safe to retry'), notStarted: true },
924923
})
925-
expect(publishToolConfirmation).toHaveBeenCalledOnce()
926924
})
927925

928926
it('tells the model a desktop call it picked up lost its result and may have acted', async () => {
@@ -932,7 +930,6 @@ describe('watchdog completion provenance', () => {
932930

933931
await failPendingToolCall(toolCall.id, context, execContext)
934932

935-
expect(completeAsyncToolCall).toHaveBeenCalledOnce()
936933
expect(toolCall.result).toEqual({
937934
success: false,
938935
output: {

‎apps/sim/lib/mothership/tools/client/browser-tool-execution.test.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,6 @@ describe('executeBrowserToolOnClient', () => {
947947
controller.abort(CHAT_VIEW_CLOSED_ABORT_REASON)
948948
await flush()
949949

950-
expect(mockCancelBrowserTool).toHaveBeenCalledWith(toolCallId, CHAT_SCOPE, 'browser_click')
951950
expect(mockReportCompletion).toHaveBeenCalledWith(
952951
toolCallId,
953952
'error',
@@ -1013,7 +1012,6 @@ describe('executeBrowserToolOnClient', () => {
10131012
finishRestore()
10141013
await flush()
10151014

1016-
expect(mockExecuteBrowserTool).not.toHaveBeenCalled()
10171015
expect(mockReportCompletion).toHaveBeenCalledWith(
10181016
toolCallId,
10191017
'error',

‎apps/sim/lib/mothership/tools/client/terminal-tool-execution.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ describe('terminal client execution', () => {
6464
)
6565
await sleep(0)
6666

67-
expect(executeTerminalTool).not.toHaveBeenCalled()
6867
expect(reportClientToolCompletion).toHaveBeenCalledWith(
6968
'terminal-stale',
7069
'error',

0 commit comments

Comments
 (0)