chore(tests): tests simplified
This commit is contained in:
parent
cb39438b26
commit
d21e093ac7
@ -2,18 +2,18 @@ import electron from "electron";
|
||||
import { Application } from "spectron";
|
||||
|
||||
const beforeEach = function() {
|
||||
this.timeout(10000);
|
||||
this.timeout(15000);
|
||||
this.app = new Application({
|
||||
path: electron,
|
||||
args: ["."],
|
||||
startTimeout: 10000,
|
||||
waitTimeout: 10000
|
||||
startTimeout: 15000,
|
||||
waitTimeout: 15000
|
||||
});
|
||||
return this.app.start();
|
||||
};
|
||||
|
||||
const afterEach = function() {
|
||||
this.timeout(10000);
|
||||
this.timeout(15000);
|
||||
if (this.app && this.app.isRunning()) {
|
||||
return this.app.stop();
|
||||
}
|
||||
|
@ -62,11 +62,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "electron-builder install-app-deps",
|
||||
"preunit": "webpack --config=build/webpack.unit.config.js --env=test --display=none",
|
||||
"unit": "electron-mocha temp/specs.js --renderer --require source-map-support/register",
|
||||
"pree2e": "webpack --config=build/webpack.app.config.js --env=test --display=none && webpack --config=build/webpack.e2e.config.js --env=test --display=none",
|
||||
"e2e": "mocha temp/e2e.js --require source-map-support/register",
|
||||
"test": "npm run unit && npm run e2e",
|
||||
"pretest": "webpack --config=build/webpack.app.config.js --env=test --display=none && webpack --config=build/webpack.e2e.config.js --env=test --display=none",
|
||||
"test": "mocha temp/e2e.js --require @babel/core/lib --require source-map-support/register",
|
||||
"start": "node build/start.js",
|
||||
"prebuild": "webpack --config=build/webpack.app.config.js --env=production",
|
||||
"build": "electron-builder"
|
||||
@ -97,7 +94,6 @@
|
||||
"css-loader": "^0.28.7",
|
||||
"electron": "1.7.11",
|
||||
"electron-builder": "^19.43.3",
|
||||
"electron-mocha": "^5.0.0",
|
||||
"friendly-errors-webpack-plugin": "^1.6.1",
|
||||
"mocha": "^4.0.1",
|
||||
"source-map-support": "^0.5.0",
|
||||
|
Loading…
Reference in New Issue
Block a user