Add spec for invalid menu item type

This commit is contained in:
Kevin Sawicki 2016-06-21 15:59:02 -07:00
parent ca57f8a391
commit 93cbe6539f
2 changed files with 14 additions and 1 deletions

View file

@ -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