Support running test-electron manually
This commit is contained in:
parent
3fa911598b
commit
9f15f26828
2 changed files with 5 additions and 0 deletions
|
@ -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()
|
||||
|
|
|
@ -19,6 +19,7 @@ const stdout = execFileSync(ELECTRON, [ROOT_DIR], {
|
|||
env: {
|
||||
...process.env,
|
||||
NODE_ENV: 'test',
|
||||
TEST_QUIT_ON_COMPLETE: 'on',
|
||||
},
|
||||
encoding: 'utf8',
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue