@@ -94,7 +94,7 @@ Deno.test({
9494 await valItemExists (
9595 val . id ,
9696 branch . id ,
97- "subdir/ test.txt" ,
97+ join ( "subdir" , " test.txt") ,
9898 await getLatestVersion ( val . id , branch . id ) ,
9999 ) ,
100100 "file should exist in subdir" ,
@@ -115,7 +115,10 @@ Deno.test({
115115 branchId : branch . id ,
116116 } ) ;
117117 assertEquals ( secondPush . renamed . length , 1 ) ;
118- assertEquals ( secondPush . renamed [ 0 ] . oldPath , "subdir/test.txt" ) ;
118+ assertEquals (
119+ secondPush . renamed [ 0 ] . oldPath ,
120+ join ( "subdir" , "test.txt" ) ,
121+ ) ;
119122 assertEquals ( secondPush . renamed [ 0 ] . path , "test.txt" ) ;
120123 } ) ;
121124
@@ -163,10 +166,10 @@ Deno.test({
163166
164167 // Get original file IDs
165168 const file1 = await sdk . vals . files
166- . retrieve ( val . id , { path : "val/ file1.ts" , recursive : true } )
169+ . retrieve ( val . id , { path : join ( "val" , " file1.ts") , recursive : true } )
167170 . then ( ( resp ) => resp . data [ 0 ] ) ;
168171 const file2 = await sdk . vals . files
169- . retrieve ( val . id , { path : "val/ file2.ts" , recursive : true } )
172+ . retrieve ( val . id , { path : join ( "val" , " file2.ts") , recursive : true } )
170173 . then ( ( resp ) => resp . data [ 0 ] ) ;
171174
172175 // Delete both files and create two new files with the same content
@@ -202,13 +205,13 @@ Deno.test({
202205 // Verify new files have different IDs than original files
203206 const newFile1 = await sdk . vals . files
204207 . retrieve ( val . id , {
205- path : "val/ newfile1.ts" ,
208+ path : join ( "val" , " newfile1.ts") ,
206209 recursive : true ,
207210 } )
208211 . then ( ( resp ) => resp . data [ 0 ] ) ;
209212 const newFile2 = await sdk . vals . files
210213 . retrieve ( val . id , {
211- path : "val/ newfile2.ts" ,
214+ path : join ( "val" , " newfile2.ts") ,
212215 recursive : true ,
213216 } )
214217 . then ( ( resp ) => resp . data [ 0 ] ) ;
@@ -279,7 +282,7 @@ Deno.test({
279282 const fileExistsAtNewPath = await valItemExists (
280283 val . id ,
281284 branch . id ,
282- "subdir/ moved_file.ts" ,
285+ join ( "subdir" , " moved_file.ts") ,
283286 await getLatestVersion ( val . id , branch . id ) ,
284287 ) ;
285288 assert ( fileExistsAtNewPath , "file should exist at new location" ) ;
@@ -299,7 +302,7 @@ Deno.test({
299302 // Verify the file ID is preserved (same file)
300303 const movedFile = await sdk . vals . files
301304 . retrieve ( val . id , {
302- path : "subdir/ moved_file.ts" ,
305+ path : join ( "subdir" , " moved_file.ts") ,
303306 recursive : true ,
304307 } )
305308 . then ( ( resp ) => resp . data [ 0 ] ) ;
@@ -410,7 +413,7 @@ Deno.test({
410413 // Get the id of the original file
411414 const originalFile = await sdk . vals . files
412415 . retrieve ( val . id , {
413- path : "val/ original.ts" ,
416+ path : join ( "val" , " original.ts") ,
414417 recursive : true ,
415418 } )
416419 . then ( ( resp ) => resp . data [ 0 ] ) ;
@@ -431,22 +434,25 @@ Deno.test({
431434
432435 // Verify rename was detected
433436 assertEquals ( statusResult . renamed . length , 1 ) ;
434- assertEquals ( statusResult . renamed [ 0 ] . oldPath , "val/original.ts" ) ;
435- assertEquals ( statusResult . renamed [ 0 ] . path , "val/renamed.ts" ) ;
437+ assertEquals (
438+ statusResult . renamed [ 0 ] . oldPath ,
439+ join ( "val" , "original.ts" ) ,
440+ ) ;
441+ assertEquals ( statusResult . renamed [ 0 ] . path , join ( "val" , "renamed.ts" ) ) ;
436442 assertEquals ( statusResult . renamed [ 0 ] . status , "renamed" ) ;
437443
438444 // Verify file ID is preserved (same file)
439445 const renamedFile = await sdk . vals . files . retrieve (
440446 val . id ,
441- { path : "val/ renamed.ts" , recursive : true } ,
447+ { path : join ( "val" , " renamed.ts") , recursive : true } ,
442448 ) . then ( ( resp ) => resp . data [ 0 ] ) ;
443449 assertEquals ( originalFile . id , renamedFile . id ) ;
444450
445451 // Verify old file is gone
446452 const oldFileExists = await valItemExists (
447453 val . id ,
448454 branch . id ,
449- "val/ original.ts" ,
455+ join ( "val" , " original.ts") ,
450456 await getLatestVersion ( val . id , branch . id ) ,
451457 ) ;
452458 assert ( ! oldFileExists , "Old file should not exist after rename" ) ;
@@ -481,7 +487,7 @@ Deno.test({
481487 // Get the id of the original file
482488 const originalFile = await sdk . vals . files
483489 . retrieve ( val . id , {
484- path : "val/ old.http.ts" ,
490+ path : join ( "val" , " old.http.ts") ,
485491 recursive : true ,
486492 } )
487493 . then ( ( resp ) => resp . data [ 0 ] ) ;
@@ -502,16 +508,19 @@ Deno.test({
502508 // Verify rename was detected
503509 assertEquals ( statusResult . renamed . length , 1 ) ;
504510 assertEquals ( statusResult . renamed [ 0 ] . type , "http" ) ;
505- assertEquals ( statusResult . renamed [ 0 ] . oldPath , "val/old.http.ts" ) ;
506- assertEquals ( statusResult . renamed [ 0 ] . path , "val/new.tsx" ) ;
511+ assertEquals (
512+ statusResult . renamed [ 0 ] . oldPath ,
513+ join ( "val" , "old.http.ts" ) ,
514+ ) ;
515+ assertEquals ( statusResult . renamed [ 0 ] . path , join ( "val" , "new.tsx" ) ) ;
507516 assertEquals ( statusResult . renamed [ 0 ] . status , "renamed" ) ;
508517 } ) ;
509518
510519 await t . step ( "verify file content, type, and uuid" , async ( ) => {
511520 // Verify file ID is preserved (same file)
512521 const renamedFile = await sdk . vals . files . retrieve (
513522 val . id ,
514- { path : "val/ new.tsx" , recursive : true } ,
523+ { path : join ( "val" , " new.tsx") , recursive : true } ,
515524 ) . then ( ( resp ) => resp . data [ 0 ] ) ;
516525 assertEquals ( originalFile . id , renamedFile . id ) ;
517526
@@ -523,7 +532,7 @@ Deno.test({
523532 val . id ,
524533 branch . id ,
525534 await getLatestVersion ( val . id , branch . id ) ,
526- "val/ new.tsx" ,
535+ join ( "val" , " new.tsx") ,
527536 ) ;
528537
529538 assertEquals ( content , "contentt" ) ;
@@ -534,7 +543,7 @@ Deno.test({
534543 const oldFileExists = await valItemExists (
535544 val . id ,
536545 branch . id ,
537- "val/ old.http.ts" ,
546+ join ( "val" , " old.http.ts") ,
538547 await getLatestVersion ( val . id , branch . id ) ,
539548 ) ;
540549 assert ( ! oldFileExists , "Old file should not exist after rename" ) ;
0 commit comments