From e9808d138f22fad1fea504d7f35bd0e24589ec26 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 6 Mar 2018 03:13:47 +0900 Subject: [PATCH] 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. --- spec/api-app-spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/api-app-spec.js b/spec/api-app-spec.js index 9fb28e3eb4..2f04a46aa2 100644 --- a/spec/api-app-spec.js +++ b/spec/api-app-spec.js @@ -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() }) })