@@ -32,12 +32,24 @@ describe("S3UploadConfig", () => {
3232 newS3UploadConfig ( { file1 : { } , file2 : { } , file3 : { } } ) ;
3333 newS3UploadConfig ( { file : { metadata : { } } } ) ;
3434 newS3UploadConfig ( { file : { contentType : { } } } ) ;
35- newS3UploadConfig ( { file : { metadata : { } , contentType : "" , contentDisposition : "" } } ) ;
3635 newS3UploadConfig ( {
37- file : { metadata : { key : "value" } , contentType : "" , contentDisposition : "" } ,
36+ file : { metadata : { } , contentType : "" , contentDisposition : "" , cacheControl : "" } ,
3837 } ) ;
3938 newS3UploadConfig ( {
40- file : { metadata : null , contentType : null , contentDisposition : null } ,
39+ file : {
40+ metadata : { key : "value" } ,
41+ contentType : "" ,
42+ contentDisposition : "" ,
43+ cacheControl : "" ,
44+ } ,
45+ } ) ;
46+ newS3UploadConfig ( {
47+ file : {
48+ metadata : null ,
49+ contentType : null ,
50+ contentDisposition : null ,
51+ cacheControl : null ,
52+ } ,
4153 } ) ;
4254 newS3UploadConfig ( { file : { unknownKey : "unknownValue" } } ) ;
4355 } ) ;
@@ -54,6 +66,7 @@ describe("S3UploadConfig", () => {
5466 "src/**/*.png" : {
5567 contentType : "image/png" ,
5668 contentDisposition : 'attachment; filename="download.png"' ,
69+ cacheControl : "public" ,
5770 } ,
5871 } ) ;
5972 } ) ;
@@ -79,6 +92,7 @@ describe("S3UploadConfig", () => {
7992 } ,
8093 contentType : "text/plain" ,
8194 contentDisposition : "inline; filename=other-name.txt" ,
95+ cacheControl : "max-age=600" ,
8296 randomKey : "value" ,
8397 } ,
8498 } ) . getS3ParamsForKey ( "file.txt" )
@@ -88,6 +102,7 @@ describe("S3UploadConfig", () => {
88102 } ,
89103 ContentType : "text/plain" ,
90104 ContentDisposition : "inline; filename=other-name.txt" ,
105+ CacheControl : "max-age=600" ,
91106 } ) ;
92107 } ) ;
93108
0 commit comments