chore: print more logging for failed tests (#22060)
This commit is contained in:
parent
b664c824d2
commit
629c2121ba
2 changed files with 12 additions and 2 deletions
|
@ -888,8 +888,12 @@ describe('Menu module', function () {
|
|||
|
||||
let output = ''
|
||||
appProcess.stdout.on('data', data => { output += data })
|
||||
appProcess.stderr.on('data', data => { output += data })
|
||||
|
||||
await emittedOnce(appProcess, 'exit')
|
||||
const [code] = await emittedOnce(appProcess, 'exit')
|
||||
if (!output.includes('Window has no menu')) {
|
||||
console.log(code, output)
|
||||
}
|
||||
expect(output).to.include('Window has no menu')
|
||||
})
|
||||
})
|
||||
|
|
|
@ -29,8 +29,14 @@ describe('WebContentsView', () => {
|
|||
it('does not crash on exit', async () => {
|
||||
const appPath = path.join(__dirname, 'fixtures', 'api', 'leak-exit-webcontentsview.js')
|
||||
const electronPath = process.execPath
|
||||
const appProcess = ChildProcess.spawn(electronPath, [appPath])
|
||||
const appProcess = ChildProcess.spawn(electronPath, ['--enable-logging', appPath])
|
||||
let output = ''
|
||||
appProcess.stdout.on('data', data => { output += data })
|
||||
appProcess.stderr.on('data', data => { output += data })
|
||||
const [code] = await emittedOnce(appProcess, 'exit')
|
||||
if (code !== 0) {
|
||||
console.log(code, output)
|
||||
}
|
||||
expect(code).to.equal(0)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue