test: report hexadecimal status codes on windows (#19597)

This commit is contained in:
Jeremy Apthorp
2019-08-02 14:23:11 -07:00
committed by GitHub
parent 3011a0f14f
commit d0800aa200

View File

@@ -123,7 +123,8 @@ async function runRemoteBasedElectronTests () {
stdio: 'inherit'
})
if (status !== 0) {
throw new Error(`Electron tests failed with code ${status}.`)
const textStatus = process.platform === 'win32' ? `0x${status.toString(16)}` : status.toString()
throw new Error(`Electron tests failed with code ${textStatus}.`)
}
}
@@ -135,7 +136,8 @@ async function runMainProcessElectronTests () {
stdio: 'inherit'
})
if (status !== 0) {
throw new Error(`Electron tests failed with code ${status}.`)
const textStatus = process.platform === 'win32' ? `0x${status.toString(16)}` : status.toString()
throw new Error(`Electron tests failed with code ${textStatus}.`)
}
}