rats-search/e2e/utils.js
Alexey Kasyanchuk d8afce8964 web -> desktop
2018-01-31 19:02:28 +03:00

27 lines
480 B
JavaScript

import electron from "electron";
import { Application } from "spectron";
const beforeEach = function() {
this.timeout(10000);
this.app = new Application({
path: electron,
args: ["."],
startTimeout: 10000,
waitTimeout: 10000
});
return this.app.start();
};
const afterEach = function() {
this.timeout(10000);
if (this.app && this.app.isRunning()) {
return this.app.stop();
}
return undefined;
};
export default {
beforeEach,
afterEach
};