From e7c68dadee127f2c23a7efe9890b4947b7eb3660 Mon Sep 17 00:00:00 2001 From: Vit Stanislav Date: Mon, 20 Nov 2017 17:59:57 +0100 Subject: [PATCH 1/2] Add eslint no-exclusive-tests rule - Closes #893 --- .eslintrc | 9 ++++++++- package.json | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index 79e7bc966..4873bc0dc 100644 --- a/.eslintrc +++ b/.eslintrc @@ -4,7 +4,8 @@ "plugin:react/recommended" ], "plugins": [ - "import" + "import", + "mocha" ], "globals": { "describe": true, @@ -20,6 +21,7 @@ "node": true }, "rules": { + "mocha/no-exclusive-tests": "error", "func-names": "off", "global-require": "off", "new-cap": ["error", { @@ -48,5 +50,10 @@ ], "linebreak-style": 0, "no-param-reassign": "off" + }, + "settings": { + "mocha/additionalTestFunctions": [ + "describeModule" + ] } } diff --git a/package.json b/package.json index 63d93b65b..7bf1164da 100644 --- a/package.json +++ b/package.json @@ -99,6 +99,7 @@ "eslint-loader": "1.9.0", "eslint-plugin-html": "3.2.2", "eslint-plugin-import": "2.7.0", + "eslint-plugin-mocha": "4.11.0", "eslint-plugin-react": "7.4.0", "exports-loader": "0.6.4", "extract-text-webpack-plugin": "3.0.0", From 620c6b58d81feb4c2a9c9220667a7bf3b9a72dbe Mon Sep 17 00:00:00 2001 From: Vit Stanislav Date: Mon, 20 Nov 2017 18:00:34 +0100 Subject: [PATCH 2/2] Remove forgotten .only --- app/src/modules/autoUpdater.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/modules/autoUpdater.test.js b/app/src/modules/autoUpdater.test.js index 460956b0f..dc7a397fc 100644 --- a/app/src/modules/autoUpdater.test.js +++ b/app/src/modules/autoUpdater.test.js @@ -2,7 +2,7 @@ import { expect } from 'chai'; // eslint-disable-line import/no-extraneous-depen import sinon, { spy } from 'sinon'; // eslint-disable-line import/no-extraneous-dependencies import autoUpdater from './autoUpdater'; -describe.only('autoUpdater', () => { +describe('autoUpdater', () => { const version = '1.2.3'; let params; let callbacks;