@@ -64,6 +64,8 @@ test.describe("macOS auto-update", () => {
6464 newVersion : NEW_VERSION ,
6565 } ;
6666 let feed : ReturnType < typeof startFeedServer > | undefined ;
67+ let app : ElectronApplication | undefined ;
68+ let updated : ElectronApplication | undefined ;
6769
6870 try {
6971 proof . failedStep = "preconditions" ;
@@ -81,7 +83,7 @@ test.describe("macOS auto-update", () => {
8183
8284 // Phase 1: drive the real download + install on the old build.
8385 proof . failedStep = "launch" ;
84- const app = await electron . launch ( {
86+ app = await electron . launch ( {
8587 executablePath : RUN_APP_BIN ,
8688 args : [ ] ,
8789 env : {
@@ -167,7 +169,7 @@ test.describe("macOS auto-update", () => {
167169 ) ;
168170
169171 proof . failedStep = "fresh-launch" ;
170- const updated = await electron . launch ( {
172+ updated = await electron . launch ( {
171173 executablePath : RUN_APP_BIN ,
172174 args : [ ] ,
173175 env : { ...process . env , ELECTRON_DISABLE_GPU : "1" } ,
@@ -205,6 +207,8 @@ test.describe("macOS auto-update", () => {
205207 proof . error = err instanceof Error ? err . message : String ( err ) ;
206208 throw err ;
207209 } finally {
210+ await app ?. close ( ) . catch ( ( ) => { } ) ;
211+ await updated ?. close ( ) . catch ( ( ) => { } ) ;
208212 feed ?. kill ( ) ;
209213 killApp ( ) ;
210214 proof . finishedAt = new Date ( ) . toISOString ( ) ;
0 commit comments