test: use exit event to wait for process exit (#21865)
This commit is contained in:
parent
2743d60f52
commit
0209302d84
7 changed files with 10 additions and 10 deletions
|
@ -30,7 +30,7 @@ describe('WebContentsView', () => {
|
|||
const appPath = path.join(__dirname, 'fixtures', 'api', 'leak-exit-webcontentsview.js')
|
||||
const electronPath = process.execPath
|
||||
const appProcess = ChildProcess.spawn(electronPath, [appPath])
|
||||
const [code] = await emittedOnce(appProcess, 'close')
|
||||
const [code] = await emittedOnce(appProcess, 'exit')
|
||||
expect(code).to.equal(0)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue