Add simple specs for app.getName() and app.getVersion().
This commit is contained in:
parent
5f4a9316f1
commit
564c5c1664
1 changed files with 23 additions and 0 deletions
23
spec/api/app.coffee
Normal file
23
spec/api/app.coffee
Normal file
|
@ -0,0 +1,23 @@
|
|||
assert = require 'assert'
|
||||
app = require('remote').require 'app'
|
||||
|
||||
describe 'app module', ->
|
||||
describe 'app.getVersion()', ->
|
||||
it 'returns the version field of package.json', ->
|
||||
assert.equal app.getVersion(), '0.1.0'
|
||||
|
||||
describe 'app.setVersion(version)', ->
|
||||
it 'overrides the version', ->
|
||||
assert.equal app.getVersion(), '0.1.0'
|
||||
app.setVersion 'test-version'
|
||||
assert.equal app.getVersion(), 'test-version'
|
||||
|
||||
describe 'app.getName()', ->
|
||||
it 'returns the name field of package.json', ->
|
||||
assert.equal app.getName(), 'atom-shell-default-app'
|
||||
|
||||
describe 'app.setName(name)', ->
|
||||
it 'overrides the name', ->
|
||||
assert.equal app.getName(), 'atom-shell-default-app'
|
||||
app.setName 'test-name'
|
||||
assert.equal app.getName(), 'test-name'
|
Loading…
Add table
Add a link
Reference in a new issue