Don't error on close directly

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2023-02-01 10:15:59 -05:00
1 parent 4c5626cd84
commit f7ba996f7a
1 file changed
+2 -7
@@ -36,13 +36,8 @@ async function getMainWindow(app: ElectronApplication, timeout = 50_000): Promis
app.on("window", onWindow);
cleanup.push(() => app.off("window", onWindow));
const onClose = () => {
cleanup();
reject(new Error("App has unnexpectedly closed"));
};
app.on("close", onClose);
cleanup.push(() => app.off("close", onClose));
app.on("close", cleanup);
cleanup.push(() => app.off("close", cleanup));
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const stdout = app.process().stdout!;