From 07dea13c777fbd3e0a63ac09ce552fc2a079b617 Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Tue, 7 Nov 2017 13:29:37 -0800 Subject: [PATCH] =?UTF-8?q?:construction=5Fworker:=20Let=E2=80=99s=20add?= =?UTF-8?q?=20a=20spec!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/api-menu-spec.js | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/spec/api-menu-spec.js b/spec/api-menu-spec.js index 560af5c05a4..2a74fc7297a 100644 --- a/spec/api-menu-spec.js +++ b/spec/api-menu-spec.js @@ -291,15 +291,22 @@ describe('Menu module', () => { }) describe('Menu.setApplicationMenu', () => { - const menu = Menu.buildFromTemplate([ - { - label: '1' - }, { - label: '2' - } - ]) - Menu.setApplicationMenu(menu) - assert.notEqual(Menu.getApplicationMenu(), null) + it('sets a menu', () => { + const menu = Menu.buildFromTemplate([ + { + label: '1' + }, { + label: '2' + } + ]) + Menu.setApplicationMenu(menu) + assert.notEqual(Menu.getApplicationMenu(), null) + }) + + it('unsets a menu with null', () => { + Menu.setApplicationMenu(null) + assert.equal(Menu.getApplicationMenu(), null) + }) }) describe('MenuItem.click', () => {