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({
|
w = new BrowserWindow({
|
||||||
show: false
|
show: false
|
||||||
})
|
})
|
||||||
w.webContents.on('ipc-message', function (event, args) {
|
w.webContents.once('ipc-message', function (event, args) {
|
||||||
assert.deepEqual(args, ['hidden', true])
|
assert.deepEqual(args, ['hidden', true])
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
|
@ -69,7 +69,7 @@ describe('chromium feature', function () {
|
||||||
w = new BrowserWindow({
|
w = new BrowserWindow({
|
||||||
show: false
|
show: false
|
||||||
})
|
})
|
||||||
w.webContents.on('ipc-message', function (event, args) {
|
w.webContents.once('ipc-message', function (event, args) {
|
||||||
assert.deepEqual(args, ['hidden', false])
|
assert.deepEqual(args, ['hidden', false])
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
|
@ -278,7 +278,7 @@ describe('chromium feature', function () {
|
||||||
w = new BrowserWindow({
|
w = new BrowserWindow({
|
||||||
show: false
|
show: false
|
||||||
})
|
})
|
||||||
w.webContents.on('ipc-message', function (event, args) {
|
w.webContents.once('ipc-message', function (event, args) {
|
||||||
assert.deepEqual(args, ['opener', null])
|
assert.deepEqual(args, ['opener', null])
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue