@@ -977,6 +977,14 @@ describe("gptscript module", () => {
977
977
await g . writeFileInWorkspace ( "test.txt" , Buffer . from ( "test" ) , workspaceID )
978
978
const content = await g . readFileInWorkspace ( "test.txt" , workspaceID )
979
979
expect ( content . toString ( ) ) . toEqual ( "test" )
980
+
981
+ const fileInfo = await g . statFileInWorkspace ( "test.txt" , workspaceID )
982
+ expect ( fileInfo . size ) . toEqual ( 4 )
983
+ expect ( fileInfo . name ) . toEqual ( "test.txt" )
984
+ expect ( fileInfo . workspaceID ) . toEqual ( workspaceID )
985
+ expect ( fileInfo . modTime ) . toBeDefined ( )
986
+
987
+ await g . deleteFileInWorkspace ( "test.txt" , workspaceID )
980
988
await g . deleteWorkspace ( workspaceID )
981
989
} , 60000 )
982
990
@@ -1034,6 +1042,14 @@ describe("gptscript module", () => {
1034
1042
await g . writeFileInWorkspace ( "test.txt" , Buffer . from ( "test" ) , workspaceID )
1035
1043
const content = await g . readFileInWorkspace ( "test.txt" , workspaceID )
1036
1044
expect ( content . toString ( ) ) . toEqual ( "test" )
1045
+
1046
+ const fileInfo = await g . statFileInWorkspace ( "test.txt" , workspaceID )
1047
+ expect ( fileInfo . size ) . toEqual ( 4 )
1048
+ expect ( fileInfo . name ) . toEqual ( "test.txt" )
1049
+ expect ( fileInfo . workspaceID ) . toEqual ( workspaceID )
1050
+ expect ( fileInfo . modTime ) . toBeDefined ( )
1051
+
1052
+ await g . deleteFileInWorkspace ( "test.txt" , workspaceID )
1037
1053
await g . deleteWorkspace ( workspaceID )
1038
1054
} , 60000 )
1039
1055
0 commit comments