diff --git a/app/main.ts b/app/main.ts index be2a175b2..85d4c733b 100644 --- a/app/main.ts +++ b/app/main.ts @@ -2138,6 +2138,10 @@ ipc.handle('getScreenCaptureSources', async () => { if (isTestEnvironment(getEnvironment())) { ipc.handle('ci:test-electron:done', async (_event, info) => { + if (!process.env.TEST_QUIT_ON_COMPLETE) { + return; + } + process.stdout.write( `ci:test-electron:done=${JSON.stringify(info)}\n`, () => app.quit() diff --git a/ts/build/test-electron.ts b/ts/build/test-electron.ts index 7ca82fbfe..cfadc5af5 100644 --- a/ts/build/test-electron.ts +++ b/ts/build/test-electron.ts @@ -19,6 +19,7 @@ const stdout = execFileSync(ELECTRON, [ROOT_DIR], { env: { ...process.env, NODE_ENV: 'test', + TEST_QUIT_ON_COMPLETE: 'on', }, encoding: 'utf8', });