@@ -125,37 +125,33 @@ describe('packager', () => {
125125 ) ;
126126 } ) ;
127127
128- it (
129- 'can overwrite older packages' ,
130- { timeout : 30_000 } , // double the timeout because we have two full packager runs
131- async ( { baseOpts } ) => {
132- const opts : Options = {
133- ...baseOpts ,
134- } ;
128+ it ( 'can overwrite older packages' , async ( { baseOpts } ) => {
129+ const opts : Options = {
130+ ...baseOpts ,
131+ } ;
135132
136- const paths = await packager ( opts ) ;
137- expect ( paths ) . toHaveLength ( 1 ) ;
138- expect ( paths [ 0 ] ) . toEqual (
139- path . join (
140- opts . out ! ,
141- generateFinalBasename ( {
142- name : opts . name ,
143- platform : process . platform ,
144- arch : getHostArch ( ) ,
145- } ) ,
146- ) ,
147- ) ;
148- // Create a dummy file to detect whether the output directory is replaced in subsequent runs
149- const testPath = path . join ( paths [ 0 ] , 'test.txt' ) ;
150- await fs . writeFile ( testPath , 'test' ) ;
151- // Second run without overwrite should be skipped
152- await packager ( opts ) ;
153- expect ( fs . existsSync ( testPath ) ) . toBe ( true ) ;
154- // Third run with overwrite should replace the output directory
155- await packager ( { ...opts , overwrite : true } ) ;
156- expect ( fs . existsSync ( testPath ) ) . toBe ( false ) ;
157- } ,
158- ) ;
133+ const paths = await packager ( opts ) ;
134+ expect ( paths ) . toHaveLength ( 1 ) ;
135+ expect ( paths [ 0 ] ) . toEqual (
136+ path . join (
137+ opts . out ! ,
138+ generateFinalBasename ( {
139+ name : opts . name ,
140+ platform : process . platform ,
141+ arch : getHostArch ( ) ,
142+ } ) ,
143+ ) ,
144+ ) ;
145+ // Create a dummy file to detect whether the output directory is replaced in subsequent runs
146+ const testPath = path . join ( paths [ 0 ] , 'test.txt' ) ;
147+ await fs . writeFile ( testPath , 'test' ) ;
148+ // Second run without overwrite should be skipped
149+ await packager ( opts ) ;
150+ expect ( fs . existsSync ( testPath ) ) . toBe ( true ) ;
151+ // Third run with overwrite should replace the output directory
152+ await packager ( { ...opts , overwrite : true } ) ;
153+ expect ( fs . existsSync ( testPath ) ) . toBe ( false ) ;
154+ } ) ;
159155
160156 it ( 'defaults the out directory to the current working directory' , async ( {
161157 baseOpts,
@@ -235,7 +231,6 @@ describe('packager', () => {
235231 // FIXME: This flakes with ENOTEMPTY: directory not empty
236232 it . runIf ( process . platform === 'darwin' ) . skip (
237233 'can package for all target platforms at once' ,
238- { timeout : 120_000 } ,
239234 async ( { baseOpts } ) => {
240235 const opts : Options = {
241236 ...baseOpts ,
@@ -264,7 +259,6 @@ describe('packager', () => {
264259
265260 it . runIf ( process . platform !== 'darwin' ) (
266261 'can package for all target platforms at once (no universal on non-darwin)' ,
267- { timeout : 120_000 } ,
268262 async ( { baseOpts } ) => {
269263 const opts : Options = {
270264 ...baseOpts ,
@@ -1368,7 +1362,7 @@ describe('packager', () => {
13681362 } ) ;
13691363
13701364 describe ( 'codesign' , ( ) => {
1371- it ( 'can sign the app' , { timeout : 60_000 } , async ( { baseOpts } ) => {
1365+ it ( 'can sign the app' , async ( { baseOpts } ) => {
13721366 const opts : Options = {
13731367 ...baseOpts ,
13741368 osxSign : { identity : 'codesign.electronjs.org' } ,
0 commit comments