From d21e093ac7e570b127d6b7f0ee3134d90a65daad Mon Sep 17 00:00:00 2001 From: Alexey Kasyanchuk Date: Wed, 31 Jan 2018 20:34:50 +0300 Subject: [PATCH] chore(tests): tests simplified --- e2e/{hello_world.e2e.js => basic.e2e.js} | 0 e2e/utils.js | 8 ++++---- package.json | 8 ++------ 3 files changed, 6 insertions(+), 10 deletions(-) rename e2e/{hello_world.e2e.js => basic.e2e.js} (100%) diff --git a/e2e/hello_world.e2e.js b/e2e/basic.e2e.js similarity index 100% rename from e2e/hello_world.e2e.js rename to e2e/basic.e2e.js diff --git a/e2e/utils.js b/e2e/utils.js index 32e750f..cb7b565 100644 --- a/e2e/utils.js +++ b/e2e/utils.js @@ -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(); } diff --git a/package.json b/package.json index 8b71229..0b6e843 100644 --- a/package.json +++ b/package.json @@ -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",