@@ -71,7 +71,7 @@ describe("wrapJustBash", () => {
7171 expect ( content ) . toBe ( "content of /test.txt" ) ;
7272 } ) ;
7373
74- it ( "wraps writeFile via fs.writeFile" , async ( ) => {
74+ it ( "wraps writeFiles via fs.writeFile" , async ( ) => {
7575 const writtenFiles : Array < { path : string ; content : string } > = [ ] ;
7676 const mockBash = {
7777 exec : async ( ) => ( { stdout : "" , stderr : "" , exitCode : 0 } ) ,
@@ -84,10 +84,14 @@ describe("wrapJustBash", () => {
8484 } ;
8585
8686 const sandbox = wrapJustBash ( mockBash ) ;
87- await sandbox . writeFile ( "/dir/test.txt" , "my content" ) ;
87+ await sandbox . writeFiles ( [
88+ { path : "/dir/test.txt" , content : "my content" } ,
89+ { path : "/other/file.txt" , content : "other content" } ,
90+ ] ) ;
8891
8992 expect ( writtenFiles ) . toEqual ( [
9093 { path : "/dir/test.txt" , content : "my content" } ,
94+ { path : "/other/file.txt" , content : "other content" } ,
9195 ] ) ;
9296 } ) ;
9397} ) ;
@@ -121,7 +125,7 @@ describe("duck-typing disambiguation", () => {
121125 const customSandbox = {
122126 executeCommand : async ( ) => ( { stdout : "" , stderr : "" , exitCode : 0 } ) ,
123127 readFile : async ( ) => "" ,
124- writeFile : async ( ) => { } ,
128+ writeFiles : async ( ) => { } ,
125129 } ;
126130
127131 expect ( isJustBash ( customSandbox ) ) . toBe ( false ) ;
0 commit comments