Support running test-electron manually

This commit is contained in:
Fedor Indutny 2021-12-18 00:12:42 +01:00 committed by GitHub
parent 3fa911598b
commit 9f15f26828
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -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()

View file

@ -19,6 +19,7 @@ const stdout = execFileSync(ELECTRON, [ROOT_DIR], {
env: {
...process.env,
NODE_ENV: 'test',
TEST_QUIT_ON_COMPLETE: 'on',
},
encoding: 'utf8',
});