mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Add spec for submenu type with no submenu
This commit is contained in:
@@ -372,4 +372,17 @@ describe('menu module', function () {
|
||||
}, /Unknown menu item type: not-a-type/)
|
||||
})
|
||||
})
|
||||
|
||||
describe('MenuItem with submenu type and missing submenu', function () {
|
||||
it('throws an exception', function () {
|
||||
assert.throws(function () {
|
||||
var menu = Menu.buildFromTemplate([
|
||||
{
|
||||
label: 'text',
|
||||
type: 'submenu'
|
||||
}
|
||||
])
|
||||
}, /Invalid submenu/)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user