diff --git a/.eslintrc.js b/.eslintrc.js index 195d0daae6a7424200200ca9e2c694f2bc5b6b87..9d68cf3abd23e188c8e6ce7686ef59070cd408d9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -49,20 +49,13 @@ module.exports = { }, { files: ['**/*.spec.{ts,tsx}'], - extends: ['plugin:jest/recommended', 'plugin:testing-library/react'], + extends: ['plugin:jest/recommended'], rules: { 'jest/no-mocks-import': 0, }, }, ], - plugins: [ - '@typescript-eslint', - 'react', - 'react-hooks', - 'jest', - 'jsx-a11y', - 'testing-library', - ], + plugins: ['@typescript-eslint', 'react', 'react-hooks', 'jest', 'jsx-a11y'], parser: '@typescript-eslint/parser', // Specifies the ESLint parser parserOptions: { ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features diff --git a/package.json b/package.json index 06c02dce22cc3b037576c2c46f3b738c31873adf..2a58e3818da63ee5b0aa447af6bd0074946b757c 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,6 @@ "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-react": "7.33.2", "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-testing-library": "^6.2.0", "git-directory-deploy": "1.5.1", "jest-canvas-mock": "^2.4.0", "jest-junit": "^16.0.0", diff --git a/src/components/Action/ActionOnGoing/ActionOnGoing.spec.tsx b/src/components/Action/ActionOnGoing/ActionOnGoing.spec.tsx index 4509fa4cd5477e3082cd07d62107824bd64e0a83..899e6e3cdeb3b9216ac26e2433901bf913bc08cb 100644 --- a/src/components/Action/ActionOnGoing/ActionOnGoing.spec.tsx +++ b/src/components/Action/ActionOnGoing/ActionOnGoing.spec.tsx @@ -46,6 +46,6 @@ describe('ActionOnGoing component', () => { ) await waitFor(() => null, { container }) await userEvent.click(await screen.findByText('action.details')) - expect(screen.getByRole('dialog')).toBeTruthy() + expect(screen.findByRole('dialog')).toBeTruthy() }) }) diff --git a/src/components/Challenge/ChallengeCardUnlocked/ChallengeCardUnlocked.spec.tsx b/src/components/Challenge/ChallengeCardUnlocked/ChallengeCardUnlocked.spec.tsx index 8aaa1d3c910a3003268600d3fbd903670ad07ebf..46c7d7a5ff3dbaa547b01c59af4ec345d753f0ea 100644 --- a/src/components/Challenge/ChallengeCardUnlocked/ChallengeCardUnlocked.spec.tsx +++ b/src/components/Challenge/ChallengeCardUnlocked/ChallengeCardUnlocked.spec.tsx @@ -38,7 +38,7 @@ describe('ChallengeCardUnlocked component', () => { </Provider> ) await userEvent.click(screen.getByRole('button')) - expect(screen.getAllByRole('dialog').length).toBeTruthy() + expect(screen.queryAllByRole('dialog').length).toBeTruthy() }) it('should not display ChallengeNoFluidModal and update userChallenge when launching challenge with configured fluid', async () => { diff --git a/yarn.lock b/yarn.lock index 0504b9bf6db583e29a2bb81d2027ff8a50e26719..421f54db99ad4410a9d3fd5ba71b3b365eb6a2b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3377,7 +3377,7 @@ eslint-scope "^5.1.1" semver "^7.3.7" -"@typescript-eslint/utils@^5.10.0", "@typescript-eslint/utils@^5.58.0": +"@typescript-eslint/utils@^5.10.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== @@ -7967,13 +7967,6 @@ eslint-plugin-react@7.33.2: semver "^6.3.1" string.prototype.matchall "^4.0.8" -eslint-plugin-testing-library@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-6.2.0.tgz#af3340b783c881eb19ec5ac6b3a4bfe8ab4a1f74" - integrity sha512-+LCYJU81WF2yQ+Xu4A135CgK8IszcFcyMF4sWkbiu6Oj+Nel0TrkZq/HvDw0/1WuO3dhDQsZA/OpEMGd0NfcUw== - dependencies: - "@typescript-eslint/utils" "^5.58.0" - eslint-plugin-vue@5.2.3: version "5.2.3" resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-5.2.3.tgz#3ee7597d823b5478804b2feba9863b1b74273961"