d2iq/ui-kit

Refactor tests from Enzyme to React Testing Library for Clickable and CodeSnippet components

Closed this issue · 1 comments

Description

This issue is related to refactoring the Clickable.test.tsx and CodeSnippet.test.tsx files.

We've recently been migrating our tests from Jest + Enzyme to Jest + testing-library/react to support a full migration to React 18.

You may refer to this previous PR beginning the migration for code examples - #771.

Acceptance Criteria

Refactor the test to use React Testing Library instead of Enzyme (which is no longer supported with React 18).

More information: Migrate from Enzyme

How to Contribute

Please review the contributing documentation beforehand.

Steps to Contribute:

  1. Fork the repository.
  2. Clone it to your local system.
  3. Create a new branch.
  4. Make your changes. Make sure that tests are still passing. To update snapshot tests, run npm run test -- -u and include the updated tests in your commit.
  5. Commit your changes. When committing prefix your commit message with the appropriate conventional commit type. For example, refactor: <component_name> tests.
  6. Push up your changes. In GitHub, click the compare & pull request button to begin drafting your pull request.
  7. Fill out the pull request form and attach the "ready for review" label when complete.

Hey @nataliepina, I would like to work on this issue.