@@ -194,23 +194,19 @@ describe('Bucket', function() {
194194
195195 describe ( 'combine' , function ( ) {
196196 it ( 'should throw if invalid sources are not provided' , function ( ) {
197- var error = 'You must provide at least two source files.' ;
198-
199197 assert . throws ( function ( ) {
200198 bucket . combine ( ) ;
201- } , new RegExp ( error ) ) ;
199+ } , / Y o u m u s t p r o v i d e a t l e a s t t w o s o u r c e f i l e s \. / ) ;
202200
203201 assert . throws ( function ( ) {
204202 bucket . combine ( [ '1' ] ) ;
205- } , new RegExp ( error ) ) ;
203+ } , / Y o u m u s t p r o v i d e a t l e a s t t w o s o u r c e f i l e s \. / ) ;
206204 } ) ;
207205
208206 it ( 'should throw if a destination is not provided' , function ( ) {
209- var error = 'A destination file must be specified.' ;
210-
211207 assert . throws ( function ( ) {
212208 bucket . combine ( [ '1' , '2' ] ) ;
213- } , new RegExp ( error ) ) ;
209+ } , / A d e s t i n a t i o n f i l e m u s t b e s p e c i f i e d \. / ) ;
214210 } ) ;
215211
216212 it ( 'should accept string or file input for sources' , function ( done ) {
@@ -292,7 +288,7 @@ describe('Bucket', function() {
292288 it ( 'should throw if content type cannot be determined' , function ( ) {
293289 assert . throws ( function ( ) {
294290 bucket . combine ( [ '1' , '2' ] , 'destination' ) ;
295- } , / A c o n t e n t t y p e c o u l d n o t b e d e t e c t e d / ) ;
291+ } , / A c o n t e n t t y p e c o u l d n o t b e d e t e c t e d f o r t h e d e s t i n a t i o n f i l e \. / ) ;
296292 } ) ;
297293
298294 it ( 'should make correct API request' , function ( done ) {
@@ -395,13 +391,13 @@ describe('Bucket', function() {
395391 it ( 'should throw if an ID is not provided' , function ( ) {
396392 assert . throws ( function ( ) {
397393 bucket . createChannel ( ) ;
398- } , ' An ID is required to create a channel.' ) ;
394+ } , / A n I D i s r e q u i r e d t o c r e a t e a c h a n n e l \. / ) ;
399395 } ) ;
400396
401397 it ( 'should throw if an address is not provided' , function ( ) {
402398 assert . throws ( function ( ) {
403399 bucket . createChannel ( ID , { } ) ;
404- } , ' An address is required to create a channel.' ) ;
400+ } , / A n a d d r e s s i s r e q u i r e d t o c r e a t e a c h a n n e l \. / ) ;
405401 } ) ;
406402
407403 it ( 'should make the correct request' , function ( done ) {
@@ -607,7 +603,7 @@ describe('Bucket', function() {
607603 it ( 'should throw if no name is provided' , function ( ) {
608604 assert . throws ( function ( ) {
609605 bucket . file ( ) ;
610- } , / A f i l e n a m e m u s t b e s p e c i f i e d / ) ;
606+ } , / A f i l e n a m e m u s t b e s p e c i f i e d \. / ) ;
611607 } ) ;
612608
613609 it ( 'should return a File object' , function ( ) {
0 commit comments