@@ -119,7 +119,15 @@ describe('Tool Call Validation', () => {
119119 // Test the validateToolCallSuccess method
120120 const validateToolCallSuccess = ( runner as any ) . validateToolCallSuccess . bind ( runner ) ;
121121
122- // Mock tool results with error
122+ // Mock tool calls and results with error
123+ const toolCalls = [
124+ {
125+ toolCallId : '1' ,
126+ toolName : 'run_flow_files' ,
127+ args : { } ,
128+ } ,
129+ ] ;
130+
123131 const toolResults = [
124132 {
125133 toolCallId : '1' ,
@@ -134,7 +142,7 @@ describe('Tool Call Validation', () => {
134142
135143 const requiredTools = [ 'run_flow_files' ] ;
136144
137- const errors = validateToolCallSuccess ( toolResults , requiredTools ) ;
145+ const errors = validateToolCallSuccess ( toolCalls , toolResults , requiredTools ) ;
138146
139147 // Should produce an error because the required tool failed
140148 expect ( errors . length ) . toBeGreaterThan ( 0 ) ;
@@ -159,7 +167,15 @@ describe('Tool Call Validation', () => {
159167 // Test the validateToolCallSuccess method
160168 const validateToolCallSuccess = ( runner as any ) . validateToolCallSuccess . bind ( runner ) ;
161169
162- // Mock tool results with success
170+ // Mock tool calls and results with success
171+ const toolCalls = [
172+ {
173+ toolCallId : '1' ,
174+ toolName : 'run_flow_files' ,
175+ args : { } ,
176+ } ,
177+ ] ;
178+
163179 const toolResults = [
164180 {
165181 toolCallId : '1' ,
@@ -174,7 +190,7 @@ describe('Tool Call Validation', () => {
174190
175191 const requiredTools = [ 'run_flow_files' ] ;
176192
177- const errors = validateToolCallSuccess ( toolResults , requiredTools ) ;
193+ const errors = validateToolCallSuccess ( toolCalls , toolResults , requiredTools ) ;
178194
179195 // Should not produce any errors
180196 expect ( errors ) . toEqual ( [ ] ) ;
0 commit comments