#7444·blueprint

Migrate Tests from Enzyme to React Testing Library (RTL)

Author: ggdouglasCreated May 5, 2025Updated Jun 17, 2026
LabelsDomain: testing

Blueprint currently relies on Enzyme for React component testing (e.g., in alertTests.tsx). Enzyme is no longer maintained and we rely on a makeshift adapter for React 18 support. We should migrate our tests to React Testing Library (RTL) or another modern alternative to ensure long-term maintainability and compatibility with future React versions. This migration will help us keep up with the React ecosystem and improve our test reliability.

See:

Tasks:

  • Audit all test files using Enzyme.
  • Replace Enzyme usage with RTL
  • Update test utilities and helpers as needed.
  • Ensure all tests pass and maintain coverage.

Audit

The following tests use Enzyme:

There are also several Table tests that leverage a custom testing harness that uses Enzyme:

(see: https://github.com/palantir/blueprint/pull/7149)