Skip to content

Commit 96b0b04

Browse files
authored
Merge pull request #3799 from swagger-api/bug/mocha-exclusive-tests
Add ESLint rule that catches `describe.only`, `it.only`
2 parents c4a74d4 + 075c94f commit 96b0b04

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.eslintrc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"extends": ["eslint:recommended", "plugin:react/recommended"],
1717

1818
"plugins": [
19-
"react"
19+
"react",
20+
"mocha"
2021
],
2122

2223
"rules": {
@@ -32,6 +33,7 @@
3233
"comma-dangle": 0,
3334
"no-console": ["error", { allow: ["warn", "error"] }],
3435
"react/jsx-no-bind": 1,
35-
"react/display-name": 0
36+
"react/display-name": 0,
37+
"mocha/no-exclusive-tests": "error"
3638
}
3739
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
"enzyme": "^2.7.1",
106106
"eslint": "^4.1.1",
107107
"eslint-plugin-import": "^2.6.0",
108+
"eslint-plugin-mocha": "^4.11.0",
108109
"eslint-plugin-react": "^7.1.0",
109110
"extract-text-webpack-plugin": "^2.1.2",
110111
"file-loader": "0.11.2",

test/core/plugins/oas3/wrap-auth-selectors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
definitionsToAuthorize
66
} from "corePlugins/oas3/auth-extensions/wrap-selectors"
77

8-
describe.only("oas3 plugin - auth extensions - wrapSelectors", function(){
8+
describe("oas3 plugin - auth extensions - wrapSelectors", function(){
99

1010
describe("execute", function(){
1111

0 commit comments

Comments
 (0)