File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -360,17 +360,17 @@ describe('MCPClient', () => {
360360 } ) ;
361361
362362 it ( 'should execute prompt successfully' , async ( ) => {
363- const mockResult = 'Prompt executed successfully' ;
363+ const mockPromptTemplate = {
364+ messages : [
365+ { content : { text : 'Prompt executed successfully' } }
366+ ]
367+ } ;
364368
365369 mockFetch . mockResolvedValue ( {
366370 ok : true ,
367371 json : ( ) => Promise . resolve ( {
368372 jsonrpc : '2.0' ,
369- result : {
370- messages : [
371- { content : { text : mockResult } }
372- ]
373- } ,
373+ result : mockPromptTemplate ,
374374 id : 1
375375 } )
376376 } as any ) ;
@@ -396,7 +396,8 @@ describe('MCPClient', () => {
396396 // Verify the API was called - detailed body validation skipped due to TypeScript complexity
397397 expect ( mockFetch ) . toHaveBeenCalledTimes ( 1 ) ;
398398
399- expect ( result ) . toBe ( mockResult ) ;
399+ // Now expects the full prompt template structure, not just the text
400+ expect ( result ) . toEqual ( mockPromptTemplate ) ;
400401 } ) ;
401402 } ) ;
402403
You can’t perform that action at this time.
0 commit comments