fix: correctly crash when there is no crashReporter (#20388)
* fix: correctly crash when there is no crashReporter * test: correctly crash when there is crashReporter
This commit is contained in:
parent
969b4d1dd3
commit
ef690c035d
4 changed files with 29 additions and 2 deletions
|
@ -415,6 +415,16 @@ describe('crashReporter module', () => {
|
|||
expect(crashReporter.getParameters()).to.not.have.a.property('hello')
|
||||
})
|
||||
})
|
||||
|
||||
describe('when not started', () => {
|
||||
it('does not prevent process from crashing', (done) => {
|
||||
const appPath = path.join(fixtures, 'api', 'cookie-app')
|
||||
const appProcess = childProcess.spawn(process.execPath, [appPath])
|
||||
appProcess.once('close', () => {
|
||||
done()
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
const waitForCrashReport = () => {
|
||||
|
|
5
spec/fixtures/crash-app/main.js
vendored
Normal file
5
spec/fixtures/crash-app/main.js
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
const { app } = require('electron')
|
||||
|
||||
app.on('ready', () => {
|
||||
process.crash()
|
||||
})
|
4
spec/fixtures/crash-app/package.json
vendored
Normal file
4
spec/fixtures/crash-app/package.json
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"name": "electron-crash-app",
|
||||
"main": "main.js"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue