Better error logging in api-app-spec.js. (#12122)

In the 'exits gracefully on macos' test for app.exit(exitCode),
print the relevant error information if the test fails.
This commit is contained in:
Charles Kerr 2018-03-06 03:13:47 +09:00 committed by GitHub
parent b530d70a7b
commit e9808d138f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,8 +169,8 @@ describe('app module', () => {
// The apple script will try to terminate the app
// If there's an error terminating the app, then it will print to stderr
ChildProcess.exec('osascript -e \'quit app "Electron"\'', (err, stdout, stderr) => {
assert(!err)
assert(!stderr.trim())
assert(!err, ['err:', err, 'stdout:', stdout, 'stderr:', stderr].join('\n'))
assert(!stderr.trim(), ['stdout:', stdout, 'stderr:', stderr].join('\n'))
done()
})
})