test: more logging in node inspector test (#23746)

This commit is contained in:
Cheng Zhao 2020-05-26 10:20:16 +09:00 committed by GitHub
parent 2029ff1903
commit 0dabd5e8c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -258,10 +258,13 @@ describe('node feature', () => {
const success = false; const success = false;
function listener (data: Buffer) { function listener (data: Buffer) {
output += data; output += data;
console.log(data); // NOTE: temporary debug logging to try to catch flake. console.log(data.toString()); // NOTE: temporary debug logging to try to catch flake.
const match = /^Debugger listening on (ws:\/\/.+:\d+\/.+)\n/m.exec(output.trim()); const match = /^Debugger listening on (ws:\/\/.+:\d+\/.+)\n/m.exec(output.trim());
if (match) { if (match) {
cleanup(); cleanup();
// NOTE: temporary debug logging to try to catch flake.
child.stderr.on('data', (m) => console.log(m.toString()));
child.stdout.on('data', (m) => console.log(m.toString()));
const w = (webContents as any).create({}) as WebContents; const w = (webContents as any).create({}) as WebContents;
w.loadURL('about:blank') w.loadURL('about:blank')
.then(() => w.executeJavaScript(`new Promise(resolve => { .then(() => w.executeJavaScript(`new Promise(resolve => {

View file

@ -1,3 +1,6 @@
const { app } = require('electron'); const { app } = require('electron');
process.on('message', () => app.quit()); process.on('message', () => {
console.log('Notified to quit');
app.quit();
});