@@ -6,7 +6,9 @@ const workerUrl = process.env.WORKER_URL;
66const ORG = 'da-e2e-test' ;
77
88describe ( '/copy operation' , ( ) => {
9- it ( 'copies a file' , async ( ) => {
9+ it ( 'copies a file' , async function ( ) {
10+ this . timeout ( 60000 ) ;
11+
1012 const blob = new Blob ( [ 'Hello World!' ] , { type : "text/html" } ) ;
1113 let body = new FormData ( ) ;
1214 body . append ( 'data' , blob ) ;
@@ -35,9 +37,16 @@ describe('/copy operation', () => {
3537 assert . strictEqual ( resp . status , 200 ) ;
3638 const content = await resp . text ( ) ;
3739 assert . strictEqual ( content , 'Hello World!' ) ;
40+
41+ resp = await fetch ( `${ workerUrl } /source/${ ORG } /copy-spec/test-file.html` , { method : 'DELETE' } ) ;
42+ assert . strictEqual ( resp . status , 204 ) ;
43+
44+ resp = await fetch ( `${ workerUrl } /source/${ ORG } /copy-spec/test-file-copy.html` , { method : 'DELETE' } ) ;
45+ assert . strictEqual ( resp . status , 204 ) ;
3846 } ) ;
3947
40- it ( 'copies a folder' , async ( ) => {
48+ it ( 'copies a folder' , async function ( ) {
49+ this . timeout ( 60000 ) ;
4150 const limit = 5 ;
4251 for ( let i = 0 ; i < limit ; i ++ ) {
4352 const blob = new Blob ( [ 'Hello World!' ] , { type : "text/html" } ) ;
@@ -65,6 +74,11 @@ describe('/copy operation', () => {
6574 assert . strictEqual ( resp . status , 200 ) ;
6675 resp = await fetch ( `${ workerUrl } /source/${ ORG } /copy-spec/test-folder-copy/index${ i } .html` ) ;
6776 assert . strictEqual ( resp . status , 200 ) ;
77+
78+ resp = await fetch ( `${ workerUrl } /source/${ ORG } /copy-spec/test-folder/index${ i } .html` , { method : 'DELETE' } ) ;
79+ assert . strictEqual ( resp . status , 204 ) ;
80+ resp = await fetch ( `${ workerUrl } /source/${ ORG } /copy-spec/test-folder-copy/index${ i } .html` , { method : 'DELETE' } ) ;
81+ assert . strictEqual ( resp . status , 204 ) ;
6882 }
6983 } ) ;
7084} ) ;
0 commit comments