Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Remove enzyme #42454

Closed
4 tasks done
Tracked by #42381
DiegoAndai opened this issue May 30, 2024 · 4 comments
Closed
4 tasks done
Tracked by #42381

[core] Remove enzyme #42454

DiegoAndai opened this issue May 30, 2024 · 4 comments
Assignees
Labels
core Infrastructure work going on behind the scenes React 19 support PRs required to support React 19 test

Comments

@DiegoAndai
Copy link
Member

DiegoAndai commented May 30, 2024

Summary

For our tests to be compatible with React 19, we must replace Enzyme. Enzyme has been dead for a while now, and we had an adapter to work with React 18. Instead of creating a new adapter, we've decided it's time to migrate.

Migration

The tests will be migrated to React Testing Library (RTL), which we already use. The steps we'll need to take on our tests are:

  • Remove createMount usage

RTL has different guiding principles from Enzyme. In a nutshell, it discourages testing implementation details. In this migration, we'll embrace this principle as it's to be the industry standard. This means some tests will require adapting, striving to test the same functionality but following this new guiding principle.

Tasks

  • Migrate describeConformance: #42447
  • Migrate other components tests (remove createMount): #42703
  • Uninstall Enzyme and related dependencies: #42706
  • Backport to master (v5)
@github-actions github-actions bot added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label May 30, 2024
@DiegoAndai DiegoAndai changed the title Remove enzyme [core] Remove enzyme May 30, 2024
@DiegoAndai DiegoAndai added test core Infrastructure work going on behind the scenes and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels May 30, 2024
@DiegoAndai DiegoAndai self-assigned this May 30, 2024
@DiegoAndai
Copy link
Member Author

@aarongarciah please add other tasks if there are any so we can keep this issue updated 😊

@aarongarciah aarongarciah added the React 19 support PRs required to support React 19 label Jun 24, 2024
@aarongarciah
Copy link
Member

All tasks are now completed in next. Should we keep this open until we backport the changes to master?

@DiegoAndai
Copy link
Member Author

Should we keep this open until we backport the changes to master?

Yes, I added a task for it 😊

@aarongarciah
Copy link
Member

Completed via #42706 and #42850

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes React 19 support PRs required to support React 19 test
Projects
None yet
Development

No branches or pull requests

2 participants