@@ -15,7 +15,7 @@ describe("Multi-client broadcast", async () => {
1515
1616 // Trigger connection so we can read the port
1717 const initSession = await client1 . createSession ( { onPermissionRequest : approveAll } ) ;
18- await initSession . destroy ( ) ;
18+ await initSession . disconnect ( ) ;
1919
2020 const actualPort = ( client1 as unknown as { actualPort : number } ) . actualPort ;
2121 let client2 = new CopilotClient ( { cliUrl : `localhost:${ actualPort } ` } ) ;
@@ -79,7 +79,7 @@ describe("Multi-client broadcast", async () => {
7979 expect ( client1ToolCompleted . length ) . toBeGreaterThan ( 0 ) ;
8080 expect ( client2ToolCompleted . length ) . toBeGreaterThan ( 0 ) ;
8181
82- await session2 . destroy ( ) ;
82+ await session2 . disconnect ( ) ;
8383 } ) ;
8484
8585 it ( "one client approves permission and both see the result" , async ( ) => {
@@ -137,7 +137,7 @@ describe("Multi-client broadcast", async () => {
137137 expect ( event . data . result . kind ) . toBe ( "approved" ) ;
138138 }
139139
140- await session2 . destroy ( ) ;
140+ await session2 . disconnect ( ) ;
141141 } ) ;
142142
143143 it ( "one client rejects permission and both see the result" , async ( ) => {
@@ -195,7 +195,7 @@ describe("Multi-client broadcast", async () => {
195195 expect ( event . data . result . kind ) . toBe ( "denied-interactively-by-user" ) ;
196196 }
197197
198- await session2 . destroy ( ) ;
198+ await session2 . disconnect ( ) ;
199199 } ) ;
200200
201201 it (
@@ -238,7 +238,7 @@ describe("Multi-client broadcast", async () => {
238238 expect ( response ?. data . content ) . toContain ( "CITY_FOR_US" ) ;
239239 expect ( response ?. data . content ) . toContain ( "CURRENCY_FOR_US" ) ;
240240
241- await session2 . destroy ( ) ;
241+ await session2 . disconnect ( ) ;
242242 }
243243 ) ;
244244
0 commit comments