Use once instead of on
This commit is contained in:
parent
60e60d86d1
commit
916920844e
1 changed files with 3 additions and 3 deletions
|
@ -54,7 +54,7 @@ describe('chromium feature', function () {
|
|||
w = new BrowserWindow({
|
||||
show: false
|
||||
})
|
||||
w.webContents.on('ipc-message', function (event, args) {
|
||||
w.webContents.once('ipc-message', function (event, args) {
|
||||
assert.deepEqual(args, ['hidden', true])
|
||||
done()
|
||||
})
|
||||
|
@ -69,7 +69,7 @@ describe('chromium feature', function () {
|
|||
w = new BrowserWindow({
|
||||
show: false
|
||||
})
|
||||
w.webContents.on('ipc-message', function (event, args) {
|
||||
w.webContents.once('ipc-message', function (event, args) {
|
||||
assert.deepEqual(args, ['hidden', false])
|
||||
done()
|
||||
})
|
||||
|
@ -278,7 +278,7 @@ describe('chromium feature', function () {
|
|||
w = new BrowserWindow({
|
||||
show: false
|
||||
})
|
||||
w.webContents.on('ipc-message', function (event, args) {
|
||||
w.webContents.once('ipc-message', function (event, args) {
|
||||
assert.deepEqual(args, ['opener', null])
|
||||
done()
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue