feat: webContents.loadURL returns a promise (#15855)

This commit is contained in:
Jeremy Apthorp 2018-12-06 12:16:19 -08:00 committed by GitHub
parent 1b8c11121f
commit 442c1b22e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 180 additions and 13 deletions

View file

@ -429,9 +429,10 @@ describe('remote module', () => {
})
it('emits unhandled rejection events in the renderer process', (done) => {
window.addEventListener('unhandledrejection', function (event) {
window.addEventListener('unhandledrejection', function handler (event) {
event.preventDefault()
assert.strictEqual(event.reason.message, 'rejected')
window.removeEventListener('unhandledrejection', handler)
done()
})