Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Fix custom tools tests
haxzie committed
Jun 12, 2025 at 12:35 UTC
7ade6cfa741329cc37012d7fce977dc9dd355b96
1 file changed
+11
-5
packages/core/test/tools/customTools.test.ts
+11
-5
@@ -105,7 +105,7 @@ describe('CustomTools', () => {
105
106
expect(toolOptions.execute).toHaveBeenCalledWith(
107
executeParams.arguments,
108
- {},
108
+ null,
109
expect.any(Function)
110
);
111
expect(result).toEqual(toolMocks.toolExecuteResponse);
@@ -146,8 +146,14 @@ describe('CustomTools', () => {
146
is_disabled: false,
147
},
148
user_id: 'test-user',
149
- data: {
150
- apiKey: 'test-key',
149
+ data: {},
150
+ state: {
151
+ authScheme: 'OAUTH2',
152
+ val: {
153
+ status: 'ACTIVE',
154
+ access_token: 'test-token',
155
+ token_type: 'Bearer',
156
+ },
157
},
158
status: 'ACTIVE',
159
status_reason: null,
@@ -175,7 +181,7 @@ describe('CustomTools', () => {
181
182
expect(toolkitTool.execute).toHaveBeenCalledWith(
183
executeParams.arguments,
178
- mockConnectedAccount.data,
184
+ mockConnectedAccount.state,
185
expect.any(Function)
186
);
187
});
@@ -199,7 +205,7 @@ describe('CustomTools', () => {
205
206
expect(toolkitTool.execute).toHaveBeenCalledWith(
207
executeParams.arguments,
202
- specificConnectedAccount.data,
208
+ specificConnectedAccount.state,
209
expect.any(Function)
210
);
211
});