From 5a658fa5f6ce00a536c64223173e07fdba81ad0a Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Fri, 8 Dec 2017 14:52:21 -0800 Subject: [PATCH] :construction_worker: Add a spec --- spec/api-menu-spec.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/spec/api-menu-spec.js b/spec/api-menu-spec.js index 538c640e7121..f57617b87714 100644 --- a/spec/api-menu-spec.js +++ b/spec/api-menu-spec.js @@ -283,9 +283,19 @@ describe('Menu module', () => { }) it('returns immediately', () => { - menu.popup(w, {x: 100, y: 100, async: true}) + menu.popup(w, {x: 100, y: 100}) menu.closePopup(w) }) + + it('works without a given BrowserWindow and options', () => { + menu.popup({x: 100, y: 100}) + menu.closePopup() + }) + + it('works without a given BrowserWindow', () => { + menu.popup(100, 100) + menu.closePopup() + }) }) describe('Menu.setApplicationMenu', () => {