Skip to content

Commit

Permalink
chore: add diagnostic logging
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Apr 11, 2022
1 parent f8cced2 commit 6160f47
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec-main/crash-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ const runFixtureAndEnsureCleanExit = (args: string[]) => {
const child = cp.spawn(process.execPath, args);
children.push(child);
child.stdout.on('data', (chunk: Buffer) => {
console.log(chunk.toString());
out += chunk.toString();
});
child.stderr.on('data', (chunk: Buffer) => {
console.log(chunk.toString());
out += chunk.toString();
});
return new Promise<void>((resolve) => {
Expand Down Expand Up @@ -44,7 +46,7 @@ describe('crash cases', () => {
it(`the "${crashCase}" case should not crash`, () => {
const fixture = path.resolve(fixturePath, crashCase);
const argsFile = path.resolve(fixture, 'electron.args');
const args = [fixture];
const args = [fixture, '--enable-logging'];
if (fs.existsSync(argsFile)) {
args.push(...fs.readFileSync(argsFile, 'utf8').trim().split('\n'));
}
Expand Down

0 comments on commit 6160f47

Please sign in to comment.