@@ -11,31 +11,31 @@ describe('S3Adapter tests', () => {
1111 delete process . env . S3_REGION ;
1212 } ) ;
1313
14- it ( 'should throw when not initialized properly' , ( ) => {
15- expect ( ( ) => {
16- var s3 = new S3Adapter ( ) ;
14+ it ( 'should throw when not initialized properly' , ( ) => {
15+ expect ( ( ) => {
16+ new S3Adapter ( ) ;
1717 } ) . toThrow ( "S3Adapter requires option 'bucket' or env. variable S3_BUCKET" ) ;
1818
19- expect ( ( ) => {
20- var s3 = new S3Adapter ( 'accessKey' , 'secretKey' , { } ) ;
19+ expect ( ( ) => {
20+ new S3Adapter ( 'accessKey' , 'secretKey' , { } ) ;
2121 } ) . toThrow ( new Error ( 'Failed to configure S3Adapter. Arguments don\'t make sense' ) ) ;
2222
23- expect ( ( ) => {
24- var s3 = new S3Adapter ( { accessKey : 'accessKey' , secretKey : 'secretKey' } ) ;
23+ expect ( ( ) => {
24+ new S3Adapter ( { accessKey : 'accessKey' , secretKey : 'secretKey' } ) ;
2525 } ) . toThrow ( "S3Adapter requires option 'bucket' or env. variable S3_BUCKET" )
2626 } )
2727
28- it ( 'should not throw when initialized properly' , ( ) => {
29- expect ( ( ) => {
30- var s3 = new S3Adapter ( 'bucket' ) ;
28+ it ( 'should not throw when initialized properly' , ( ) => {
29+ expect ( ( ) => {
30+ new S3Adapter ( 'bucket' ) ;
3131 } ) . not . toThrow ( )
3232
33- expect ( ( ) => {
34- var s3 = new S3Adapter ( { bucket : 'bucket' } ) ;
33+ expect ( ( ) => {
34+ new S3Adapter ( { bucket : 'bucket' } ) ;
3535 } ) . not . toThrow ( )
3636
3737 expect ( ( ) => {
38- var s3 = new S3Adapter ( { } , { params :{ Bucket : 'bucket' } } ) ;
38+ new S3Adapter ( { } , { params :{ Bucket : 'bucket' } } ) ;
3939 } ) . not . toThrow ( )
4040 } ) ;
4141
@@ -50,34 +50,34 @@ describe('S3Adapter tests', () => {
5050 describe ( 'not initialized properly' , ( ) => {
5151 it ( 'should fail with two string arguments' , ( ) => {
5252 expect ( ( ) => {
53- var s3 = new S3Adapter ( config . get ( 'accessKey' ) , config . get ( 'secretKey' ) , { } ) ;
53+ new S3Adapter ( config . get ( 'accessKey' ) , config . get ( 'secretKey' ) , { } ) ;
5454 } ) . toThrow ( new Error ( 'Failed to configure S3Adapter. Arguments don\'t make sense' ) ) ;
5555 } ) ;
5656
5757 it ( 'should fail when passed an object without a bucket' , ( ) => {
5858 expect ( ( ) => {
59- var s3 = new S3Adapter ( config . get ( 'insufficientOptions' ) ) ;
59+ new S3Adapter ( config . get ( 'insufficientOptions' ) ) ;
6060 } ) . toThrow ( "S3Adapter requires option 'bucket' or env. variable S3_BUCKET" )
6161 } ) ;
6262 } ) ;
6363
6464
6565 describe ( 'should not throw when initialized properly' , ( ) => {
6666 it ( 'should accept a string bucket' , ( ) => {
67- expect ( ( ) => {
68- var s3 = new S3Adapter ( config . get ( 'bucket' ) ) ;
67+ expect ( ( ) => {
68+ new S3Adapter ( config . get ( 'bucket' ) ) ;
6969 } ) . not . toThrow ( )
7070 } ) ;
7171
7272 it ( 'should accept an object with a bucket' , ( ) => {
73- expect ( ( ) => {
74- var s3 = new S3Adapter ( config . get ( 'objectWithBucket' ) ) ;
73+ expect ( ( ) => {
74+ new S3Adapter ( config . get ( 'objectWithBucket' ) ) ;
7575 } ) . not . toThrow ( )
7676 } ) ;
7777
7878 it ( 'should accept a second argument of object with a params object with a bucket' , ( ) => {
7979 expect ( ( ) => {
80- var s3 = new S3Adapter ( config . get ( 'emptyObject' ) , config . get ( 'paramsObjectWBucket' ) ) ;
80+ new S3Adapter ( config . get ( 'emptyObject' ) , config . get ( 'paramsObjectWBucket' ) ) ;
8181 } ) . not . toThrow ( )
8282 } ) ;
8383
0 commit comments