@@ -115,7 +115,6 @@ const isCI = process.env.CI === 'true';
115115 // Parse upload response
116116 const uploadResult = JSON . parse ( uploadContent . text ) ;
117117 expect ( uploadResult ) . toHaveProperty ( 'root' ) ;
118- < < < << << HEAD
119118 // The root can be either a string or an object with toString method
120119 expect ( uploadResult . root ) . toBeDefined ( ) ;
121120 expect ( uploadResult ) . toHaveProperty ( 'url' ) ;
@@ -132,16 +131,14 @@ const isCI = process.env.CI === 'true';
132131 // Check the first file entry (could be in different formats depending on serialization)
133132 const firstFile = fileEntries [ 0 ] ;
134133 expect ( firstFile ) . toBeDefined ( ) ;
135- === === =
136- expect ( typeof uploadResult . root ) . toBe ( 'string' ) ;
134+ // The root can be either a string or an object with toString method
135+ expect ( uploadResult . root ) . toBeDefined ( ) ;
137136 expect ( uploadResult ) . toHaveProperty ( 'url' ) ;
138137 expect ( uploadResult ) . toHaveProperty ( 'files' ) ;
139- expect ( Array . isArray ( uploadResult . files ) ) . toBe ( true ) ;
140- expect ( uploadResult . files . length ) . toBeGreaterThan ( 0 ) ;
141- expect ( uploadResult . files [ 0 ] ) . toHaveProperty ( 'name' ) ;
142- expect ( uploadResult . files [ 0 ] ) . toHaveProperty ( 'url' ) ;
143- expect ( uploadResult . files [ 0 ] ) . toHaveProperty ( 'cid' ) ;
144- >>> > >>> 8 ed405d ( feat : preserve filename using uploadDirectory )
138+
139+ // Test that files is an object with at least one entry
140+ expect ( typeof uploadResult . files ) . toBe ( 'object' ) ;
141+ expect ( uploadResult . files ) . not . toBeNull ( ) ;
145142 } , 30_000 ) ; // Increase the timeout for upload test
146143
147144 it ( 'should retrieve a file' , async ( ) => {
0 commit comments