Use once instead of on

This commit is contained in:
Kevin Sawicki 2016-08-03 10:50:01 -07:00
parent 60e60d86d1
commit 916920844e

View file

@ -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()
}) })