Skip to content

Commit b0c1547

Browse files
Vikhyath MondretiVikhyath Mondreti
authored andcommitted
fix test failure
1 parent d19632a commit b0c1547

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

apps/sim/executor/handlers/function/function-handler.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ describe('FunctionBlockHandler', () => {
7777
code: inputs.code,
7878
timeout: inputs.timeout,
7979
envVars: {},
80+
blockData: {},
81+
blockNameMapping: {},
8082
_context: { workflowId: mockContext.workflowId },
8183
}
8284
const expectedOutput: BlockOutput = { response: { result: 'Success' } }
@@ -100,6 +102,8 @@ describe('FunctionBlockHandler', () => {
100102
code: expectedCode,
101103
timeout: inputs.timeout,
102104
envVars: {},
105+
blockData: {},
106+
blockNameMapping: {},
103107
_context: { workflowId: mockContext.workflowId },
104108
}
105109
const expectedOutput: BlockOutput = { response: { result: 'Success' } }
@@ -116,6 +120,8 @@ describe('FunctionBlockHandler', () => {
116120
code: inputs.code,
117121
timeout: 5000, // Default timeout
118122
envVars: {},
123+
blockData: {},
124+
blockNameMapping: {},
119125
_context: { workflowId: mockContext.workflowId },
120126
}
121127

apps/sim/tools/function/execute.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ describe('Function Execute Tool', () => {
5050
expect(body).toEqual({
5151
code: 'return 42',
5252
envVars: {},
53+
blockData: {},
54+
blockNameMapping: {},
5355
isCustomTool: false,
5456
timeout: 5000,
5557
workflowId: undefined,
@@ -73,6 +75,8 @@ describe('Function Execute Tool', () => {
7375
code: 'const x = 40;\nconst y = 2;\nreturn x + y;',
7476
timeout: 10000,
7577
envVars: {},
78+
blockData: {},
79+
blockNameMapping: {},
7680
isCustomTool: false,
7781
workflowId: undefined,
7882
})
@@ -87,6 +91,8 @@ describe('Function Execute Tool', () => {
8791
code: 'return 42',
8892
timeout: 10000,
8993
envVars: {},
94+
blockData: {},
95+
blockNameMapping: {},
9096
isCustomTool: false,
9197
workflowId: undefined,
9298
})

0 commit comments

Comments
 (0)