Merge pull request #7143 from electron/windows-spec-failures
Fix windows spec failures
This commit is contained in:
commit
de6f405d98
3 changed files with 13 additions and 3 deletions
|
@ -31,7 +31,7 @@ The `crash-reporter` module has the following methods:
|
|||
* `options` Object
|
||||
* `companyName` String
|
||||
* `submitURL` String - URL that crash reports will be sent to as POST.
|
||||
* `productName` String (optional) - Default is `Electron`.
|
||||
* `productName` String (optional) - Defaults to `app.getName()`.
|
||||
* `autoSubmit` Boolean - Send the crash report without user interaction.
|
||||
Default is `true`.
|
||||
* `ignoreSystemCrashHandler` Boolean - Default is `false`.
|
||||
|
|
|
@ -233,10 +233,14 @@ describe('node feature', function () {
|
|||
})
|
||||
})
|
||||
|
||||
it('should have isTTY defined', function () {
|
||||
it('should have isTTY defined on Mac and Linux', function () {
|
||||
if (isCI) return
|
||||
|
||||
assert.equal(typeof process.stdout.isTTY, 'boolean')
|
||||
if (process.platform === 'win32') {
|
||||
assert.equal(process.stdout.isTTY, undefined)
|
||||
} else {
|
||||
assert.equal(typeof process.stdout.isTTY, 'boolean')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ process.throwDeprecation = true
|
|||
|
||||
const electron = require('electron')
|
||||
const app = electron.app
|
||||
const crashReporter = electron.crashReporter
|
||||
const ipcMain = electron.ipcMain
|
||||
const dialog = electron.dialog
|
||||
const BrowserWindow = electron.BrowserWindow
|
||||
|
@ -39,6 +40,11 @@ ipcMain.on('message', function (event, ...args) {
|
|||
event.sender.send('message', ...args)
|
||||
})
|
||||
|
||||
// Set productName so getUploadedReports() uses the right directory in specs
|
||||
if (process.platform === 'win32') {
|
||||
crashReporter.productName = 'Zombies'
|
||||
}
|
||||
|
||||
// Write output to file if OUTPUT_TO_FILE is defined.
|
||||
const outputToFile = process.env.OUTPUT_TO_FILE
|
||||
const print = function (_, args) {
|
||||
|
|
Loading…
Reference in a new issue