mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
25 lines
570 B
CoffeeScript
25 lines
570 B
CoffeeScript
Native = require 'native'
|
|
|
|
describe "Native", ->
|
|
nativeModule = null
|
|
|
|
beforeEach ->
|
|
nativeModule = new Native
|
|
|
|
describe "addMenuItem(path, keyBinding)", ->
|
|
mainMenu = null
|
|
mainMenuItems = null
|
|
|
|
beforeEach ->
|
|
mainMenu = OSX.NSApp.mainMenu
|
|
mainMenuItems = mainMenu.itemArray
|
|
|
|
it "adds the item at the path terminus to the main menu, adding submenus as needed", ->
|
|
initialMenuCount = mainMenu.itemArray.length
|
|
|
|
nativeModule.addMenuItem('Submenu > Item')
|
|
|
|
expect(mainMenu.itemArray.length).toBe initialMenuCount + 1
|
|
|
|
|