@@ -159,9 +159,9 @@ describe('MCP Client Integration', () => {
159159 } ) as ToolResponse ;
160160 expect ( nextTaskResult . isError ) . toBeFalsy ( ) ;
161161 const nextTask = JSON . parse ( ( nextTaskResult . content [ 0 ] as { text : string } ) . text ) ;
162- expect ( nextTask . status ) . toBe ( "next_task " ) ;
163- expect ( nextTask . task ) . toBeDefined ( ) ;
164- const taskId = nextTask . task . id ;
162+ expect ( nextTask . status ) . toBe ( "success " ) ;
163+ expect ( nextTask . data ) . toHaveProperty ( 'task' ) ;
164+ const taskId = nextTask . data . task . id ;
165165 console . log ( 'Got next task with ID:' , taskId ) ;
166166
167167 // Mark task as done
@@ -202,7 +202,6 @@ describe('MCP Client Integration', () => {
202202 it ( 'should have accurate version' , async ( ) => {
203203 console . log ( 'Testing server version...' ) ;
204204 const response = await client . getServerVersion ( ) ;
205- expect ( response ) . toBeDefined ( ) ;
206205 expect ( response ) . toHaveProperty ( 'version' ) ;
207206 // Should match package.json version
208207 const packageJson = JSON . parse (
@@ -242,9 +241,9 @@ describe('MCP Client Integration', () => {
242241 } ) as ToolResponse ;
243242 expect ( nextTaskResult . isError ) . toBeFalsy ( ) ;
244243 const nextTask = JSON . parse ( ( nextTaskResult . content [ 0 ] as { text : string } ) . text ) ;
245- expect ( nextTask . status ) . toBe ( "next_task " ) ;
246- expect ( nextTask . task ) . toBeDefined ( ) ;
247- const taskId = nextTask . task . id ;
244+ expect ( nextTask . status ) . toBe ( "success " ) ;
245+ expect ( nextTask . data ) . toHaveProperty ( 'task' ) ;
246+ const taskId = nextTask . data . task . id ;
248247
249248 // Mark task as done - we need to mark it as done using the update_task tool
250249 const markDoneResult = await client . callTool ( {
0 commit comments