diff --git a/spec/api-menu-spec.js b/spec/api-menu-spec.js index bf5c9871cd3a..0c3cb50e4d4f 100644 --- a/spec/api-menu-spec.js +++ b/spec/api-menu-spec.js @@ -429,26 +429,26 @@ describe('menu module', function () { assert.equal(item.getDefaultRoleAccelerator(), process.platform === 'win32' ? 'Control+Y' : 'Shift+CommandOrControl+Z') }) }) -}) -describe('MenuItem with custom properties in constructor', function () { - it('preserves the custom properties', function () { - var template = [{ - label: 'menu 1', - customProp: 'foo', - submenu: [] - }] + describe('MenuItem with custom properties in constructor', function () { + it('preserves the custom properties', function () { + var template = [{ + label: 'menu 1', + customProp: 'foo', + submenu: [] + }] - var menu = Menu.buildFromTemplate(template) - menu.items[0].submenu.append(new MenuItem({ - label: 'item 1', - customProp: 'bar', - overrideProperty: 'oops not allowed' - })) + var menu = Menu.buildFromTemplate(template) + menu.items[0].submenu.append(new MenuItem({ + label: 'item 1', + customProp: 'bar', + overrideProperty: 'oops not allowed' + })) - assert.equal(menu.items[0].customProp, 'foo') - assert.equal(menu.items[0].submenu.items[0].label, 'item 1') - assert.equal(menu.items[0].submenu.items[0].customProp, 'bar') - assert.equal(typeof menu.items[0].submenu.items[0].overrideProperty, 'function') + assert.equal(menu.items[0].customProp, 'foo') + assert.equal(menu.items[0].submenu.items[0].label, 'item 1') + assert.equal(menu.items[0].submenu.items[0].customProp, 'bar') + assert.equal(typeof menu.items[0].submenu.items[0].overrideProperty, 'function') + }) }) })