🔥 added test

This commit is contained in:
akashnimare
2016-09-10 07:57:09 +05:30
parent 05d483b44c
commit f1a5bfcabf
3 changed files with 43 additions and 3 deletions

28
tests/index.js Normal file
View File

@@ -0,0 +1,28 @@
/* eslint semi: ["error", "never"]*/
const assert = require('assert')
const Application = require('spectron').Application
describe('application launch', function () {
this.timeout(10000)
beforeEach(function () {
this.app = new Application({
path: __dirname + '/../node_modules/.bin/electron',
args: [__dirname + '/../app/main/index.js']
})
return this.app.start()
})
afterEach(function () {
if (this.app && this.app.isRunning()) {
return this.app.stop()
}
})
it('shows an initial window', function () {
return this.app.client.getWindowCount().then(function (count) {
assert.equal(count, 1)
})
})
})