Skip to content

Commit

Permalink
duplicate non-firing macOS event listener 馃槼
Browse files Browse the repository at this point in the history
  • Loading branch information
erickzhao committed Jul 1, 2019
1 parent f429443 commit fbc8ad2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spec/api-browser-window-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2345,13 +2345,19 @@ describe('BrowserWindow module', () => {

child.on('show', () => {
w.once('focus', () => {
expect(childWindowClosed).to.equal(true, 'Main window should only regain focus once the modal is closed')
expect(childWindowClosed).to.equal(true,
'Main window should only regain focus once the modal is closed')
done()
})
w.focus() // this should not trigger the above listener
child.close()
})

// trying stuff...
child.on('close', () => {
childWindowClosed = true
})

child.on('closed', () => {
childWindowClosed = true
})
Expand Down

0 comments on commit fbc8ad2

Please sign in to comment.