mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
add first pass at menu event specs
This commit is contained in:
@@ -284,6 +284,17 @@ describe('Menu module', () => {
|
||||
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', () => {
|
||||
const { browserWindow, x, y } = menu.popup(w, {x: 100, y: 101})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user