@@ -343,25 +343,25 @@ describe('EndToEnd', () => {
343343 } ) ;
344344
345345 describe ( 'PATCH' , ( ) => {
346- // it('should 404 paths without a file id', (done) => {
347- // agent.patch(`${STORE_PATH}/`)
348- // .set('Tus-Resumable', TUS_RESUMABLE)
349- // .set('Upload-Offset', 0)
350- // .set('Content-Type', 'application/offset+octet-stream')
351- // .expect(404)
352- // .expect('Tus-Resumable', TUS_RESUMABLE)
353- // .end(done);
354- // });
346+ it ( 'should 404 paths without a file id' , ( done ) => {
347+ agent . patch ( `${ STORE_PATH } /` )
348+ . set ( 'Tus-Resumable' , TUS_RESUMABLE )
349+ . set ( 'Upload-Offset' , 0 )
350+ . set ( 'Content-Type' , 'application/offset+octet-stream' )
351+ . expect ( 404 )
352+ . expect ( 'Tus-Resumable' , TUS_RESUMABLE )
353+ . end ( done ) ;
354+ } ) ;
355355
356- // it('should 404 paths that do not exist', (done) => {
357- // agent.patch(`${STORE_PATH}/dont_exist`)
358- // .set('Tus-Resumable', TUS_RESUMABLE)
359- // .set('Upload-Offset', 0)
360- // .set('Content-Type', 'application/offset+octet-stream')
361- // .expect(404)
362- // .expect('Tus-Resumable', TUS_RESUMABLE)
363- // .end(done);
364- // });
356+ it ( 'should 404 paths that do not exist' , ( done ) => {
357+ agent . patch ( `${ STORE_PATH } /dont_exist` )
358+ . set ( 'Tus-Resumable' , TUS_RESUMABLE )
359+ . set ( 'Upload-Offset' , 0 )
360+ . set ( 'Content-Type' , 'application/offset+octet-stream' )
361+ . expect ( 404 )
362+ . expect ( 'Tus-Resumable' , TUS_RESUMABLE )
363+ . end ( done ) ;
364+ } ) ;
365365
366366 it ( 'should upload the file' , ( done ) => {
367367 const read_stream = fs . createReadStream ( TEST_FILE_PATH ) ;
@@ -387,7 +387,7 @@ describe('EndToEnd', () => {
387387 this . timeout ( 0 ) ;
388388
389389 // GCS need a few seconds before it can show the changes
390- const TIMEOUT = 5000 ;
390+ const TIMEOUT = 10000 ;
391391 console . log ( `Pausing for ${ TIMEOUT / 1000 } seconds while GCS updates...` ) ;
392392 setTimeout ( ( ) => {
393393 done ( ) ;
@@ -398,9 +398,9 @@ describe('EndToEnd', () => {
398398 agent . head ( `${ STORE_PATH } /${ file_id } ` )
399399 . set ( 'Tus-Resumable' , TUS_RESUMABLE )
400400 . expect ( 200 )
401- // .expect('Upload-Metadata', TEST_METADATA)
401+ . expect ( 'Upload-Metadata' , TEST_METADATA )
402402 . expect ( 'Upload-Offset' , TEST_FILE_SIZE )
403- // .expect('Upload-Length', TEST_FILE_SIZE)
403+ . expect ( 'Upload-Length' , TEST_FILE_SIZE )
404404 . expect ( 'Tus-Resumable' , TUS_RESUMABLE )
405405 . end ( done ) ;
406406 } ) ;
0 commit comments