Add spec for submenu type with no submenu
This commit is contained in:
parent
93cbe6539f
commit
51b8c0292c
1 changed files with 13 additions and 0 deletions
|
@ -372,4 +372,17 @@ describe('menu module', function () {
|
||||||
}, /Unknown menu item type: not-a-type/)
|
}, /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/)
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue