refactor: make name a prop on app (#17701)

Update app.name to be a property on app.
This commit is contained in:
Shelley Vohr 2019-04-30 13:55:33 -07:00 committed by GitHub
parent f2d41b7812
commit 8d83518f9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 57 additions and 25 deletions

View file

@ -246,7 +246,7 @@ describe('MenuItems', () => {
'minimize': 'Minimize',
'paste': 'Paste',
'pasteandmatchstyle': 'Paste and Match Style',
'quit': (process.platform === 'darwin') ? `Quit ${app.getName()}` : (process.platform === 'win32') ? 'Exit' : 'Quit',
'quit': (process.platform === 'darwin') ? `Quit ${app.name}` : (process.platform === 'win32') ? 'Exit' : 'Quit',
'redo': 'Redo',
'reload': 'Reload',
'resetzoom': 'Actual Size',
@ -316,7 +316,7 @@ describe('MenuItems', () => {
it('includes a default submenu layout when submenu is empty', () => {
const item = new MenuItem({ role: 'appMenu' })
expect(item.label).to.equal(app.getName())
expect(item.label).to.equal(app.name)
expect(item.submenu.items[0].role).to.equal('about')
expect(item.submenu.items[1].type).to.equal('separator')
expect(item.submenu.items[2].role).to.equal('services')
@ -335,7 +335,7 @@ describe('MenuItems', () => {
role: 'close'
}]
})
expect(item.label).to.equal(app.getName())
expect(item.label).to.equal(app.name)
expect(item.submenu.items[0].role).to.equal('close')
})
})