@@ -47,7 +47,7 @@ describe("ACPFilesystemBackend", () => {
4747 const result = await backend . read ( path . join ( tmpDir , "local.txt" ) ) ;
4848
4949 expect ( mockConn . readTextFile ) . toHaveBeenCalledTimes ( 1 ) ;
50- expect ( result ) . toBe ( "acp file content" ) ;
50+ expect ( result . content ) . toBe ( "acp file content" ) ;
5151 } ) ;
5252
5353 it ( "should resolve relative paths using cwd" , async ( ) => {
@@ -73,7 +73,7 @@ describe("ACPFilesystemBackend", () => {
7373 const result = await backend . read ( path . join ( tmpDir , "local.txt" ) ) ;
7474
7575 expect ( mockConn . readTextFile ) . not . toHaveBeenCalled ( ) ;
76- expect ( result ) . toContain ( "local file content" ) ;
76+ expect ( result . content ) . toContain ( "local file content" ) ;
7777 } ) ;
7878
7979 it ( "should fall back to local FS when ACP read fails" , async ( ) => {
@@ -87,7 +87,7 @@ describe("ACPFilesystemBackend", () => {
8787 const result = await backend . read ( path . join ( tmpDir , "local.txt" ) ) ;
8888
8989 expect ( mockConn . readTextFile ) . toHaveBeenCalledTimes ( 1 ) ;
90- expect ( result ) . toContain ( "local file content" ) ;
90+ expect ( result . content ) . toContain ( "local file content" ) ;
9191 } ) ;
9292
9393 it ( "should handle offset and limit when reading via ACP" , async ( ) => {
@@ -102,7 +102,7 @@ describe("ACPFilesystemBackend", () => {
102102
103103 const result = await backend . read ( path . join ( tmpDir , "local.txt" ) , 1 , 2 ) ;
104104
105- expect ( result ) . toBe ( "line1\nline2" ) ;
105+ expect ( result . content ) . toBe ( "line1\nline2" ) ;
106106 } ) ;
107107
108108 it ( "should pass sessionId in readTextFile call" , async ( ) => {
@@ -206,10 +206,12 @@ describe("ACPFilesystemBackend", () => {
206206 } ) ;
207207 backend . setSessionId ( "sess_123" ) ;
208208
209- const entries = await backend . lsInfo ( tmpDir ) ;
209+ const lsResult = await backend . lsInfo ( tmpDir ) ;
210210
211211 expect ( mockConn . readTextFile ) . not . toHaveBeenCalled ( ) ;
212212 expect ( mockConn . writeTextFile ) . not . toHaveBeenCalled ( ) ;
213+ expect ( lsResult . error ) . toBeUndefined ( ) ;
214+ const entries = lsResult . files || [ ] ;
213215 expect ( entries . some ( ( e : any ) => e . path . includes ( "local.txt" ) ) ) . toBe ( true ) ;
214216 } ) ;
215217
@@ -232,9 +234,11 @@ describe("ACPFilesystemBackend", () => {
232234 } ) ;
233235 backend . setSessionId ( "sess_123" ) ;
234236
235- const matches = await backend . globInfo ( "*.txt" , tmpDir ) ;
237+ const globResult = await backend . globInfo ( "*.txt" , tmpDir ) ;
236238
237239 expect ( mockConn . readTextFile ) . not . toHaveBeenCalled ( ) ;
240+ expect ( globResult . error ) . toBeUndefined ( ) ;
241+ const matches = globResult . files || [ ] ;
238242 expect ( matches . length ) . toBeGreaterThan ( 0 ) ;
239243 } ) ;
240244 } ) ;
0 commit comments