Skip to content

Commit

Permalink
Exit the app after relaunch (#2767)
Browse files Browse the repository at this point in the history
* Exit the app after relaunch
* Update mocks
  • Loading branch information
jameskerr authored May 10, 2023
1 parent 461e4e3 commit 2082c17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/js/electron/zui-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export class ZuiMain {
})
await this.session.delete()
app.relaunch()
app.exit(0)
}

saveSession() {
Expand Down
3 changes: 3 additions & 0 deletions src/test/shared/__mocks__/electron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ class MockApp extends EventEmitter {
getAppPath() {
return `/test/app`
}
exit() {
return
}
}

export const app = new MockApp()
Expand Down

0 comments on commit 2082c17

Please sign in to comment.