From 87395cdef81a73147dfc75bfb5eeac6337221d16 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Thu, 17 Mar 2016 16:09:16 -0700 Subject: [PATCH] add failing spec for undefined accelerator --- spec/api-menu-spec.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spec/api-menu-spec.js b/spec/api-menu-spec.js index b27840ec4f2e..b7bff910f2b9 100644 --- a/spec/api-menu-spec.js +++ b/spec/api-menu-spec.js @@ -32,6 +32,17 @@ describe('menu module', function() { ]); }); + it('does not throw exceptions for undefined/null values', function() { + assert.doesNotThrow(function(){ + Menu.buildFromTemplate([ + { + label: 'text', + accelerator: undefined + } + ]); + }); + }); + describe('Menu.buildFromTemplate should reorder based on item position specifiers', function() { it('should position before existing item', function() { var menu = Menu.buildFromTemplate([