add first pass at menu event specs
This commit is contained in:
parent
bef4c84799
commit
e345342e36
1 changed files with 11 additions and 0 deletions
|
@ -284,6 +284,17 @@ describe('Menu module', () => {
|
||||||
return closeWindow(w).then(() => { w = null })
|
return closeWindow(w).then(() => { w = null })
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('should emit menu-will-show event', (done) => {
|
||||||
|
menu.popup(w)
|
||||||
|
menu.on('menu-will-show', () => { done() })
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should emit menu-will-close event', (done) => {
|
||||||
|
menu.popup(w)
|
||||||
|
menu.closePopup()
|
||||||
|
menu.on('menu-will-close', () => { done() })
|
||||||
|
})
|
||||||
|
|
||||||
it('returns immediately', () => {
|
it('returns immediately', () => {
|
||||||
const { browserWindow, x, y } = menu.popup(w, {x: 100, y: 101})
|
const { browserWindow, x, y } = menu.popup(w, {x: 100, y: 101})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue