Skip to content

[core] Remove enzyme #42454

@DiegoAndai

Description

@DiegoAndai

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)

Metadata

Metadata

Assignees

Labels

integration: reactAbout improving React support.internalBehind-the-scenes enhancement. Formerly called “core”.test

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions