File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -285,4 +285,26 @@ describe('Zipping', () => {
285
285
expect ( await project . fileExists ( sourcesZip ) ) . toBe ( false ) ;
286
286
} ,
287
287
) ;
288
+
289
+ it ( 'exclude files in .zip except those with a bang !' , async ( ) => {
290
+ const project = new TestProject ( {
291
+ name : 'test' ,
292
+ version : '1.0.0' ,
293
+ } ) ;
294
+ project . addFile (
295
+ 'entrypoints/background.ts' ,
296
+ 'export default defineBackground(() => {});' ,
297
+ ) ;
298
+ const unzipDir = project . resolvePath ( '.output/test-1.0.0-chrome' ) ;
299
+ const sourcesZip = project . resolvePath ( '.output/test-1.0.0-chrome.zip' ) ;
300
+
301
+ await project . zip ( {
302
+ zip : {
303
+ exclude : [ '**/*.json' , '!manifest.json' ] ,
304
+ } ,
305
+ } ) ;
306
+
307
+ await extract ( sourcesZip , { dir : unzipDir } ) ;
308
+ expect ( await project . fileExists ( unzipDir , 'manifest.json' ) ) . toBe ( true ) ;
309
+ } ) ;
288
310
} ) ;
You can’t perform that action at this time.
0 commit comments