2013-12-05 05:37:01 +00:00
|
|
|
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'
|
2013-12-06 06:54:29 +00:00
|
|
|
app.setVersion '0.1.0'
|
2013-12-05 05:37:01 +00:00
|
|
|
|
|
|
|
describe 'app.getName()', ->
|
|
|
|
it 'returns the name field of package.json', ->
|
2014-05-05 07:45:50 +00:00
|
|
|
assert.equal app.getName(), 'Atom Shell Default App'
|
2013-12-05 05:37:01 +00:00
|
|
|
|
|
|
|
describe 'app.setName(name)', ->
|
|
|
|
it 'overrides the name', ->
|
2014-05-05 07:45:50 +00:00
|
|
|
assert.equal app.getName(), 'Atom Shell Default App'
|
2013-12-05 05:37:01 +00:00
|
|
|
app.setName 'test-name'
|
|
|
|
assert.equal app.getName(), 'test-name'
|
2014-05-05 07:45:50 +00:00
|
|
|
app.setName 'Atom Shell Default App'
|