Add spec for invalid menu item type
This commit is contained in:
parent
ca57f8a391
commit
93cbe6539f
2 changed files with 14 additions and 1 deletions
|
@ -70,7 +70,7 @@ const MenuItem = function (options) {
|
|||
this.overrideProperty('checked', false)
|
||||
|
||||
if (!MenuItem.types.includes(this.type)) {
|
||||
throw new Error(`Unknown menu type ${this.type}`)
|
||||
throw new Error(`Unknown menu item type: ${this.type}`)
|
||||
}
|
||||
|
||||
this.commandId = ++nextCommandId
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue