Migrate Toast and Toaster component tests from Enzyme to React Testing Library
Closed this issue · 4 comments
nataliepina commented
Description
This issue is related to refactoring the Toast.test.tsx
and Toaster.test.tsx
file tests.
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:
- Fork the repository.
- Clone it to your local system.
- Create a new branch.
- 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. - Commit your changes. When committing prefix your commit message with the appropriate conventional commit type. For example,
refactor: <component_name> tests
. - Push up your changes. In GitHub, click the compare & pull request button to begin drafting your pull request.
- Fill out the pull request form and attach the "ready for review" label when complete.
deek121477 commented
Can I work on this issue?
nataliepina commented
I've assigned you thanks @deek121477
nataliepina commented
Let us know if you need any help here as well!
nataliepina commented
This issue has been completed so I am closing it.