@@ -117,6 +117,7 @@ describe('s3-index plugin', function() {
117
117
filePattern : DEFAULT_FILE_PATTERN ,
118
118
filePath : DIST_DIR + '/' + DEFAULT_FILE_PATTERN ,
119
119
gzippedFilePaths : [ ] ,
120
+ brotliCompressedFilePaths : [ ] ,
120
121
revisionKey : REVISION_KEY ,
121
122
allowOverwrite : false
122
123
} ;
@@ -160,6 +161,7 @@ describe('s3-index plugin', function() {
160
161
filePattern : DEFAULT_FILE_PATTERN ,
161
162
filePath : DIST_DIR + '/' + DEFAULT_FILE_PATTERN ,
162
163
gzippedFilePaths : [ ] ,
164
+ brotliCompressedFilePaths : [ ] ,
163
165
revisionKey : REVISION_KEY ,
164
166
allowOverwrite : false
165
167
} ;
@@ -183,6 +185,31 @@ describe('s3-index plugin', function() {
183
185
filePattern : DEFAULT_FILE_PATTERN ,
184
186
filePath : DIST_DIR + '/' + DEFAULT_FILE_PATTERN ,
185
187
gzippedFilePaths : [ 'index.html' ] ,
188
+ brotliCompressedFilePaths : [ ] ,
189
+ revisionKey : REVISION_KEY ,
190
+ allowOverwrite : false
191
+ } ;
192
+
193
+ assert . deepEqual ( s3Options , expected ) ;
194
+ } ) ;
195
+ } ) ;
196
+
197
+ it ( 'passes brotliCompressedFilePaths to S3 based on the `context.brotliCompressedFiles` that ember-cli-deploy-compress provides' , function ( ) {
198
+ context . brotliCompressedFiles = [ 'index.html' ] ;
199
+
200
+ var promise = plugin . upload ( context ) ;
201
+
202
+ return assert . isFulfilled ( promise )
203
+ . then ( function ( ) {
204
+ var expected = {
205
+ acl : DEFAULT_ACL ,
206
+ cacheControl : DEFAULT_CACHE_CONTROL ,
207
+ bucket : BUCKET ,
208
+ prefix : DEFAULT_PREFIX ,
209
+ filePattern : DEFAULT_FILE_PATTERN ,
210
+ filePath : DIST_DIR + '/' + DEFAULT_FILE_PATTERN ,
211
+ gzippedFilePaths : [ ] ,
212
+ brotliCompressedFilePaths : [ 'index.html' ] ,
186
213
revisionKey : REVISION_KEY ,
187
214
allowOverwrite : false
188
215
} ;
0 commit comments