Skip to content

Commit fbfae70

Browse files
committed
spec: Fix exception when refreshing test window
1 parent 39bd2be commit fbfae70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/api-web-contents-spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ describe('webContents module', function () {
6363
const specWebContents = remote.getCurrentWebContents()
6464
assert.equal(specWebContents.getId(), webContents.getFocusedWebContents().getId())
6565

66-
specWebContents.on('devtools-opened', function () {
66+
specWebContents.once('devtools-opened', function () {
6767
assert.equal(specWebContents.devToolsWebContents.getId(), webContents.getFocusedWebContents().getId())
6868
specWebContents.closeDevTools()
6969
})
7070

71-
specWebContents.on('devtools-closed', function () {
71+
specWebContents.once('devtools-closed', function () {
7272
assert.equal(specWebContents.getId(), webContents.getFocusedWebContents().getId())
7373
done()
7474
})

0 commit comments

Comments
 (0)