File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,7 +123,6 @@ const (
123123
124124 // PermissionRequestResultKindDeniedInteractivelyByUser indicates the permission was denied interactively by the user.
125125 PermissionRequestResultKindDeniedInteractivelyByUser PermissionRequestResultKind = "denied-interactively-by-user"
126-
127126)
128127
129128// PermissionRequestResult represents the result of a permission request
Original file line number Diff line number Diff line change @@ -43,7 +43,9 @@ describe("Client", () => {
4343 expect ( client . getState ( ) ) . toBe ( "disconnected" ) ;
4444 } ) ;
4545
46- it . skipIf ( process . platform === "darwin" ) ( "should return errors on failed cleanup" , async ( ) => {
46+ it . skipIf ( process . platform === "darwin" ) (
47+ "should stop cleanly when the server exits during cleanup" ,
48+ async ( ) => {
4749 // Use TCP mode to avoid stdin stream destruction issues
4850 // Without this, on macOS there are intermittent test failures
4951 // saying "Cannot call write after a stream was destroyed"
@@ -61,9 +63,12 @@ describe("Client", () => {
6163 await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) ) ;
6264
6365 const errors = await client . stop ( ) ;
64- expect ( errors . length ) . toBeGreaterThan ( 0 ) ;
65- expect ( errors [ 0 ] . message ) . toContain ( "Failed to disconnect session" ) ;
66- } ) ;
66+ expect ( client . getState ( ) ) . toBe ( "disconnected" ) ;
67+ if ( errors . length > 0 ) {
68+ expect ( errors [ 0 ] . message ) . toContain ( "Failed to disconnect session" ) ;
69+ }
70+ }
71+ ) ;
6772
6873 it ( "should forceStop without cleanup" , async ( ) => {
6974 const client = new CopilotClient ( { } ) ;
Original file line number Diff line number Diff line change @@ -28,11 +28,7 @@ async def test_v2_permission_adapter_rejects_no_result(self):
2828 await client .start ()
2929 try :
3030 session = await client .create_session (
31- {
32- "on_permission_request" : lambda request , invocation : {
33- "kind" : "no-result"
34- }
35- }
31+ {"on_permission_request" : lambda request , invocation : {"kind" : "no-result" }}
3632 )
3733 with pytest .raises (ValueError , match = "protocol v2 server" ):
3834 await client ._handle_permission_request_v2 (
You can’t perform that action at this time.
0 commit comments