[CI > Test] Initial Add

This commit is contained in:
Ducko 2022-02-01 20:54:35 +00:00
parent 4b54121c59
commit 55920b6f00
2 changed files with 62 additions and 0 deletions

19
scripts/testStartup.js Normal file
View file

@ -0,0 +1,19 @@
const { execFile } = require('child_process');
const test = () => {
const proc = execFile(process.argv[2], ['--enable-logging']);
let success = false;
proc.stderr.on('data', (data) => {
if (data.toString().includes('FAST CONNECT')) { // Main window JS running, startup success
success = true;
proc.kill();
}
});
proc.on('close', async () => {
process.exit(success ? 0 : 1);
});
};
test();