@@ -235,7 +235,7 @@ describe('File', function() {
235
235
it ( 'should throw if no destination is provided' , function ( ) {
236
236
assert . throws ( function ( ) {
237
237
file . copy ( ) ;
238
- } , / s h o u l d h a v e a n a m e / ) ;
238
+ } , / D e s t i n a t i o n f i l e s h o u l d h a v e a n a m e \. / ) ;
239
239
} ) ;
240
240
241
241
it ( 'should URI encode file names' , function ( done ) {
@@ -335,7 +335,7 @@ describe('File', function() {
335
335
it ( 'should throw if a destination cannot be parsed' , function ( ) {
336
336
assert . throws ( function ( ) {
337
337
file . copy ( function ( ) { } ) ;
338
- } , / s h o u l d h a v e a n a m e / ) ;
338
+ } , / D e s t i n a t i o n f i l e s h o u l d h a v e a n a m e \. / ) ;
339
339
} ) ;
340
340
} ) ;
341
341
@@ -479,21 +479,21 @@ describe('File', function() {
479
479
start : 3 ,
480
480
end : 8
481
481
} ) ;
482
- } , / C a n n o t u s e v a l i d a t i o n w i t h f i l e r a n g e s / ) ;
482
+ } , / C a n n o t u s e v a l i d a t i o n w i t h f i l e r a n g e s \( s t a r t \/ e n d \) \. / ) ;
483
483
484
484
assert . throws ( function ( ) {
485
485
file . createReadStream ( {
486
486
validation : true ,
487
487
start : 3
488
488
} ) ;
489
- } , / C a n n o t u s e v a l i d a t i o n w i t h f i l e r a n g e s / ) ;
489
+ } , / C a n n o t u s e v a l i d a t i o n w i t h f i l e r a n g e s \( s t a r t \/ e n d \) \. / ) ;
490
490
491
491
assert . throws ( function ( ) {
492
492
file . createReadStream ( {
493
493
validation : true ,
494
494
end : 8
495
495
} ) ;
496
- } , / C a n n o t u s e v a l i d a t i o n w i t h f i l e r a n g e s / ) ;
496
+ } , / C a n n o t u s e v a l i d a t i o n w i t h f i l e r a n g e s \( s t a r t \/ e n d \) \. / ) ;
497
497
498
498
assert . doesNotThrow ( function ( ) {
499
499
file . createReadStream ( {
@@ -1600,7 +1600,7 @@ describe('File', function() {
1600
1600
file . getSignedPolicy ( {
1601
1601
expires : expires
1602
1602
} , function ( ) { } ) ;
1603
- } , / c a n n o t b e i n t h e p a s t / ) ;
1603
+ } , / A n e x p i r a t i o n d a t e c a n n o t b e i n t h e p a s t \. / ) ;
1604
1604
} ) ;
1605
1605
} ) ;
1606
1606
@@ -1635,7 +1635,7 @@ describe('File', function() {
1635
1635
expires : Date . now ( ) + 5 ,
1636
1636
equals : [ { } ]
1637
1637
} , function ( ) { } ) ;
1638
- } , / E q u a l s c o n d i t i o n m u s t b e a n a r r a y / ) ;
1638
+ } , / E q u a l s c o n d i t i o n m u s t b e a n a r r a y o f 2 e l e m e n t s \. / ) ;
1639
1639
} ) ;
1640
1640
1641
1641
it ( 'should throw if equal condition length is not 2' , function ( ) {
@@ -1644,7 +1644,7 @@ describe('File', function() {
1644
1644
expires : Date . now ( ) + 5 ,
1645
1645
equals : [ [ '1' , '2' , '3' ] ]
1646
1646
} , function ( ) { } ) ;
1647
- } , / E q u a l s c o n d i t i o n m u s t b e a n a r r a y o f 2 e l e m e n t s / ) ;
1647
+ } , / E q u a l s c o n d i t i o n m u s t b e a n a r r a y o f 2 e l e m e n t s \. / ) ;
1648
1648
} ) ;
1649
1649
} ) ;
1650
1650
@@ -1679,7 +1679,7 @@ describe('File', function() {
1679
1679
expires : Date . now ( ) + 5 ,
1680
1680
startsWith : [ { } ]
1681
1681
} , function ( ) { } ) ;
1682
- } , / S t a r t s W i t h c o n d i t i o n m u s t b e a n a r r a y / ) ;
1682
+ } , / S t a r t s W i t h c o n d i t i o n m u s t b e a n a r r a y o f 2 e l e m e n t s \. / ) ;
1683
1683
} ) ;
1684
1684
1685
1685
it ( 'should throw if prefix condition length is not 2' , function ( ) {
@@ -1688,7 +1688,7 @@ describe('File', function() {
1688
1688
expires : Date . now ( ) + 5 ,
1689
1689
startsWith : [ [ '1' , '2' , '3' ] ]
1690
1690
} , function ( ) { } ) ;
1691
- } , / S t a r t s W i t h c o n d i t i o n m u s t b e a n a r r a y o f 2 e l e m e n t s / ) ;
1691
+ } , / S t a r t s W i t h c o n d i t i o n m u s t b e a n a r r a y o f 2 e l e m e n t s \. / ) ;
1692
1692
} ) ;
1693
1693
} ) ;
1694
1694
@@ -1711,7 +1711,7 @@ describe('File', function() {
1711
1711
expires : Date . now ( ) + 5 ,
1712
1712
contentLengthRange : [ { max : 1 } ]
1713
1713
} , function ( ) { } ) ;
1714
- } , / C o n t e n t L e n g t h R a n g e m u s t h a v e n u m e r i c m i n & m a x f i e l d s / ) ;
1714
+ } , / C o n t e n t L e n g t h R a n g e m u s t h a v e n u m e r i c m i n & m a x f i e l d s \. / ) ;
1715
1715
} ) ;
1716
1716
1717
1717
it ( 'should throw if content length has no max' , function ( ) {
@@ -1720,7 +1720,7 @@ describe('File', function() {
1720
1720
expires : Date . now ( ) + 5 ,
1721
1721
contentLengthRange : [ { min : 0 } ]
1722
1722
} , function ( ) { } ) ;
1723
- } , / C o n t e n t L e n g t h R a n g e m u s t h a v e n u m e r i c m i n & m a x f i e l d s / ) ;
1723
+ } , / C o n t e n t L e n g t h R a n g e m u s t h a v e n u m e r i c m i n & m a x f i e l d s \. / ) ;
1724
1724
} ) ;
1725
1725
} ) ;
1726
1726
} ) ;
@@ -1962,7 +1962,7 @@ describe('File', function() {
1962
1962
action : 'read' ,
1963
1963
expires : expires
1964
1964
} , function ( ) { } ) ;
1965
- } , / c a n n o t b e i n t h e p a s t / ) ;
1965
+ } , / A n e x p i r a t i o n d a t e c a n n o t b e i n t h e p a s t \. / ) ;
1966
1966
} ) ;
1967
1967
} ) ;
1968
1968
@@ -2077,12 +2077,6 @@ describe('File', function() {
2077
2077
} ) ;
2078
2078
2079
2079
describe ( 'move' , function ( ) {
2080
- it ( 'should throw if no destination is provided' , function ( ) {
2081
- assert . throws ( function ( ) {
2082
- file . move ( ) ;
2083
- } , / s h o u l d h a v e a n a m e / ) ;
2084
- } ) ;
2085
-
2086
2080
describe ( 'copy to destination' , function ( ) {
2087
2081
function assertCopyFile ( file , expectedDestination , callback ) {
2088
2082
file . copy = function ( destination ) {
0 commit comments