refactor: make name a prop on app (#17701)
Update app.name to be a property on app.
This commit is contained in:
parent
f2d41b7812
commit
8d83518f9a
15 changed files with 57 additions and 25 deletions
|
@ -84,19 +84,35 @@ describe('app module', () => {
|
|||
})
|
||||
})
|
||||
|
||||
describe('app.name', () => {
|
||||
it('returns the name field of package.json', () => {
|
||||
expect(app.name).to.equal('Electron Test Main')
|
||||
})
|
||||
|
||||
it('overrides the name', () => {
|
||||
expect(app.name).to.equal('Electron Test Main')
|
||||
app.name = 'test-name'
|
||||
|
||||
expect(app.name).to.equal('test-name')
|
||||
app.name = 'Electron Test Main'
|
||||
})
|
||||
})
|
||||
|
||||
// TODO(codebytere): remove when propertyification is complete
|
||||
describe('app.getName()', () => {
|
||||
it('returns the name field of package.json', () => {
|
||||
expect(app.getName()).to.equal('Electron Test Main')
|
||||
})
|
||||
})
|
||||
|
||||
// TODO(codebytere): remove when propertyification is complete
|
||||
describe('app.setName(name)', () => {
|
||||
it('overrides the name', () => {
|
||||
expect(app.getName()).to.equal('Electron Test Main')
|
||||
app.setName('test-name')
|
||||
|
||||
expect(app.getName()).to.equal('test-name')
|
||||
app.setName('Electron Test')
|
||||
app.setName('Electron Test Main')
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue