diff --git a/.eslintrc.js b/.eslintrc.js index b3b744b32..846b4d3ce 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -16,7 +16,8 @@ module.exports = { }, plugins: [ "react", - "react-hooks" + "react-hooks", + "mocha" ], rules: { "quotes": [ @@ -38,7 +39,9 @@ module.exports = { "react/no-unescaped-entities": 0, "react/display-name": 1, "react-hooks/rules-of-hooks": "error", - "react-hooks/exhaustive-deps": "warn" + "react-hooks/exhaustive-deps": "warn", + "mocha/no-skipped-tests": "warn", + "mocha/no-exclusive-tests": "error" }, settings: { "react": { @@ -90,7 +93,7 @@ module.exports = { ] }, { - files: [ "**/*.test.js" ], + files: ["**/*.test.js"], env: { mocha: true } diff --git a/mon-entreprise/cypress/integration/mon-entreprise/simulateurs.js b/mon-entreprise/cypress/integration/mon-entreprise/simulateurs.js index f6533858c..42361c5eb 100644 --- a/mon-entreprise/cypress/integration/mon-entreprise/simulateurs.js +++ b/mon-entreprise/cypress/integration/mon-entreprise/simulateurs.js @@ -144,7 +144,7 @@ describe('Simulateur salariƩ', () => { cy.contains('Steenvoorde (59114)') }) - it.only('should permit selecting the smic before part-time contrat', function() { + it('should permit selecting the smic before part-time contrat', function() { cy.get('input[name$="brut de base"').click() cy.get('button') .contains('SMIC') diff --git a/package.json b/package.json index 9c2f9ccfe..052417441 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "enzyme-adapter-react-16": "^1.1.1", "eslint": "^6.8.0", "eslint-config-prettier": "^4.0.0", + "eslint-plugin-mocha": "^8.0.0", "eslint-plugin-react": "^7.12.4", "eslint-plugin-react-hooks": "^2.0.1", "express": "^4.16.3", diff --git a/yarn.lock b/yarn.lock index 7e2eebeb9..1fe7d0a3e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4765,6 +4765,14 @@ eslint-config-prettier@^4.0.0: dependencies: get-stdin "^6.0.0" +eslint-plugin-mocha@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-8.0.0.tgz#7ec5d228bcb3735301701dfbc3376320a1ca3791" + integrity sha512-n67etbWDz6NQM+HnTwZHyBwz/bLlYPOxUbw7bPuCyFujv7ZpaT/Vn6KTAbT02gf7nRljtYIjWcTxK/n8a57rQQ== + dependencies: + eslint-utils "^2.1.0" + ramda "^0.27.1" + eslint-plugin-react-hooks@^2.0.1: version "2.5.1" resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.5.1.tgz#4ef5930592588ce171abeb26f400c7fbcbc23cd0" @@ -4818,7 +4826,7 @@ eslint-utils@^1.4.3: dependencies: eslint-visitor-keys "^1.1.0" -eslint-utils@^2.0.0: +eslint-utils@^2.0.0, eslint-utils@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== @@ -9878,7 +9886,7 @@ ramda@^0.26.1: resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.26.1.tgz#8d41351eb8111c55353617fc3bbffad8e4d35d06" integrity sha512-hLWjpy7EnsDBb0p+Z3B7rPi3GDeRG5ZtiI33kJhTt+ORCd38AbAIjB/9zRIUoeTbE/AVX5ZkU7m6bznsvrf8eQ== -ramda@^0.27, ramda@^0.27.0: +ramda@^0.27, ramda@^0.27.0, ramda@^0.27.1: version "0.27.1" resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.1.tgz#66fc2df3ef873874ffc2da6aa8984658abacf5c9" integrity sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw==