@@ -92,33 +92,7 @@ describe('packager', () => {
9292 ) ,
9393 ) . toBe ( false ) ;
9494
95- // packages main.js
96- const inputMain = path . join ( __dirname , 'fixtures' , 'basic' , 'main.js' ) ;
97- const outputMain = path . join ( resourcesPath , 'app' , 'main.js' ) ;
98-
99- expect ( fs . readFileSync ( inputMain , 'utf8' ) ) . toEqual (
100- fs . readFileSync ( outputMain , 'utf8' ) ,
101- ) ;
102-
103- // packages subdirectory resources
104- const inputResource = path . join (
105- __dirname ,
106- 'fixtures' ,
107- 'basic' ,
108- 'ignore' ,
109- 'this.txt' ,
110- ) ;
111- const outputResource = path . join (
112- resourcesPath ,
113- 'app' ,
114- 'ignore' ,
115- 'this.txt' ,
116- ) ;
117-
118- expect ( fs . readFileSync ( inputResource , 'utf8' ) ) . toEqual (
119- fs . readFileSync ( outputResource , 'utf8' ) ,
120- ) ;
121-
95+ expect ( fs . existsSync ( path . join ( resourcesPath , 'app.asar' ) ) ) . toBe ( true ) ;
12296 expect ( fs . existsSync ( path . join ( resourcesPath , 'default_app' ) ) ) . toBe ( false ) ;
12397 expect ( fs . existsSync ( path . join ( resourcesPath , 'default_app.asar' ) ) ) . toBe (
12498 false ,
@@ -213,6 +187,7 @@ describe('packager', () => {
213187 derefSymlinks : false ,
214188 platform : 'linux' ,
215189 arch : 'x64' ,
190+ asar : false ,
216191 } as const ;
217192
218193 const src = path . join ( opts . dir , 'main.js' ) ;
@@ -569,19 +544,19 @@ describe('packager', () => {
569544 'beforeCopy' ,
570545 'afterCopy' ,
571546 'afterPrune' ,
547+ 'afterAsar' ,
572548 'afterInitialize' ,
573549 'afterComplete' ,
574550 ] ,
575551 } ,
576552 {
577- testOpts : { asar : true } ,
553+ testOpts : { asar : false } ,
578554 expectedOutput : [
579555 'afterFinalizePackageTargets' ,
580556 'afterExtract' ,
581557 'beforeCopy' ,
582558 'afterCopy' ,
583559 'afterPrune' ,
584- 'afterAsar' ,
585560 'afterInitialize' ,
586561 'afterComplete' ,
587562 ] ,
@@ -593,6 +568,7 @@ describe('packager', () => {
593568 'afterExtract' ,
594569 'beforeCopy' ,
595570 'afterCopy' ,
571+ 'afterAsar' ,
596572 'afterInitialize' ,
597573 'afterComplete' ,
598574 ] ,
@@ -717,6 +693,7 @@ describe('packager', () => {
717693 } ) => {
718694 const opts = {
719695 ...baseOpts ,
696+ asar : false ,
720697 } ;
721698
722699 const paths = await packager ( opts ) ;
0 commit comments