@@ -6,6 +6,7 @@ import type { Socket } from "socket.io-client"
66import  { 
77	type  TaskLike , 
88	type  ClineMessage , 
9+ 	type  StaticAppProperties , 
910	RooCodeEventName , 
1011	TaskBridgeEventName , 
1112	TaskBridgeCommandName , 
@@ -21,12 +22,14 @@ describe("TaskChannel", () => {
2122	let  mockTask : TaskLike 
2223	const  instanceId  =  "test-instance-123" 
2324	const  taskId  =  "test-task-456" 
24- 	const  extensionMetadata  =  { 
25- 		name : "roo-code" , 
26- 		publisher : "Roocode" , 
27- 		version : "1.0.0" , 
28- 		outputChannel : "Roo Code" , 
29- 		sha : undefined , 
25+ 
26+ 	const  appProperties : StaticAppProperties  =  { 
27+ 		appName : "roo-code" , 
28+ 		appVersion : "1.0.0" , 
29+ 		vscodeVersion : "1.0.0" , 
30+ 		platform : "darwin" , 
31+ 		editorName : "Roo Code" , 
32+ 		hostname : "test-host" , 
3033	} 
3134
3235	beforeEach ( ( )  =>  { 
@@ -84,7 +87,7 @@ describe("TaskChannel", () => {
8487		// Create task channel instance 
8588		taskChannel  =  new  TaskChannel ( { 
8689			instanceId, 
87- 			extensionMetadata , 
90+ 			appProperties , 
8891		} ) 
8992	} ) 
9093
@@ -330,7 +333,7 @@ describe("TaskChannel", () => {
330333			channel . subscribedTasks . set ( taskId ,  mockTask ) 
331334		} ) 
332335
333- 		it ( "should handle Message command" ,  ( )  =>  { 
336+ 		it ( "should handle Message command" ,  async   ( )  =>  { 
334337			const  command  =  { 
335338				type : TaskBridgeCommandName . Message , 
336339				taskId, 
@@ -341,7 +344,7 @@ describe("TaskChannel", () => {
341344				} , 
342345			} 
343346
344- 			taskChannel . handleCommand ( command ) 
347+ 			await   taskChannel . handleCommand ( command ) 
345348
346349			expect ( mockTask . submitUserMessage ) . toHaveBeenCalledWith ( 
347350				command . payload . text , 
@@ -351,7 +354,7 @@ describe("TaskChannel", () => {
351354			) 
352355		} ) 
353356
354- 		it ( "should handle ApproveAsk command" ,  ( )  =>  { 
357+ 		it ( "should handle ApproveAsk command" ,  async   ( )  =>  { 
355358			const  command  =  { 
356359				type : TaskBridgeCommandName . ApproveAsk , 
357360				taskId, 
@@ -361,12 +364,12 @@ describe("TaskChannel", () => {
361364				} , 
362365			} 
363366
364- 			taskChannel . handleCommand ( command ) 
367+ 			await   taskChannel . handleCommand ( command ) 
365368
366369			expect ( mockTask . approveAsk ) . toHaveBeenCalledWith ( command . payload ) 
367370		} ) 
368371
369- 		it ( "should handle DenyAsk command" ,  ( )  =>  { 
372+ 		it ( "should handle DenyAsk command" ,  async   ( )  =>  { 
370373			const  command  =  { 
371374				type : TaskBridgeCommandName . DenyAsk , 
372375				taskId, 
@@ -376,12 +379,12 @@ describe("TaskChannel", () => {
376379				} , 
377380			} 
378381
379- 			taskChannel . handleCommand ( command ) 
382+ 			await   taskChannel . handleCommand ( command ) 
380383
381384			expect ( mockTask . denyAsk ) . toHaveBeenCalledWith ( command . payload ) 
382385		} ) 
383386
384- 		it ( "should log error for unknown task" ,  ( )  =>  { 
387+ 		it ( "should log error for unknown task" ,  async   ( )  =>  { 
385388			const  errorSpy  =  vi . spyOn ( console ,  "error" ) 
386389
387390			const  command  =  { 
@@ -393,7 +396,7 @@ describe("TaskChannel", () => {
393396				} , 
394397			} 
395398
396- 			taskChannel . handleCommand ( command ) 
399+ 			await   taskChannel . handleCommand ( command ) 
397400
398401			expect ( errorSpy ) . toHaveBeenCalledWith ( `[TaskChannel] Unable to find task unknown-task` ) 
399402
0 commit comments