Files
zulip-desktop/tests/index.js
James Steele c594979d9b Use the standard method to get the electron app location
As per the guidance at
https://github.com/electron-userland/electron-prebuilt programmatic usage
acquires the path to electron by require('electron')
2016-09-10 20:37:43 +01:00

28 lines
608 B
JavaScript

const assert = require('assert')
const Application = require('spectron').Application
describe('application launch', function () {
this.timeout(10000)
beforeEach(function () {
this.app = new Application({
path: require('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)
})
})
})