diff --git a/electron/package.json b/electron/package.json index f3cce087bd4..944f323b14d 100644 --- a/electron/package.json +++ b/electron/package.json @@ -61,13 +61,13 @@ "url": "https://github.com/wireapp/wire-desktop.git" }, "scripts": { + "coverage": "yarn coverage:clean && yarn coverage:instrument && yarn test && yarn coverage:report && yarn coverage:check", "coverage:check": "istanbul check-coverage --branches=10 --functions=10 --lines=35 --statements=30 instrumented-code/coverage.json", "coverage:clean": "rimraf coverage instrumented-code", "coverage:instrument": "istanbul instrument dist --no-compact --complete-copy --output instrumented-code", "coverage:report": "remap-istanbul --input instrumented-code/coverage.json --output coverage -t html", - "coverage:test": "electron-mocha", - "coverage": "yarn coverage:clean && yarn coverage:instrument && yarn coverage:test && yarn coverage:report && yarn coverage:check", - "postinstall": "electron-rebuild -f -w node-addressbook" + "postinstall": "electron-rebuild -f -w node-addressbook", + "test": "electron-mocha" }, "updateWinUrl": "https://wire-app.wire.com/win/internal/" } diff --git a/electron/test/main/BeforeTest.js b/electron/test/main/BeforeTest.js index 1aa1d6b7e21..e1293d8615b 100644 --- a/electron/test/main/BeforeTest.js +++ b/electron/test/main/BeforeTest.js @@ -22,6 +22,4 @@ const loadSourceCode = () => { }).forEach(file => require(path.resolve(file))); }; -before(() => { - loadSourceCode(); -}); +before(() => loadSourceCode());