# enzymejs/enzyme

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/enzymejs-enzyme).**

19,831 stars · 1,970 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/enzymejs/enzyme
- awesome-repositories: https://awesome-repositories.com/repository/enzymejs-enzyme.md

## Description

Enzyme is a testing utility for React components designed to verify their output and behavior in a test environment. It serves as a test harness for UI components, providing tools to render visual elements, manage state transitions, and simulate synthetic events.

The library distinguishes itself through multiple rendering modes, including a shallow rendering engine for isolated unit testing and full DOM rendering for testing deep integration. It employs an adapter-based integration system to maintain compatibility across different versions of the underlying framework.

The toolkit covers a broad range of capabilities including component state manipulation and render tree analysis. It provides mechanisms for selector-based tree traversal to query rendered output and synthetic event simulation to validate the execution of event handlers.

## Tags

### Testing & Quality Assurance

- [React Component Testing](https://awesome-repositories.com/f/testing-quality-assurance/react-component-testing.md) — Serves as a comprehensive utility for verifying that React components render and behave as expected.
- [User Interaction Simulation](https://awesome-repositories.com/f/testing-quality-assurance/automation-interaction-tools/user-interaction-simulation.md) — Simulates human input and device states to test how the application responds to user events.
- [Component Rendering Utilities](https://awesome-repositories.com/f/testing-quality-assurance/component-rendering-utilities.md) — Generates component output using multiple rendering modes to verify structure and behavior. ([source](https://cdn.jsdelivr.net/gh/enzymejs/enzyme@main/README.md))
- [DOM Simulation Rendering](https://awesome-repositories.com/f/testing-quality-assurance/dom-simulation-rendering.md) — Renders components into a simulated browser environment for deep integration and behavioral verification.
- [Component and Interaction Testing](https://awesome-repositories.com/f/testing-quality-assurance/general-testing-utilities/test-utilities-assertions/browser-ui-interaction/component-interaction-testing.md) — Provides a harness for mounting components, simulating user inputs, and verifying UI interactions.
- [Component State Manipulators](https://awesome-repositories.com/f/testing-quality-assurance/general-testing-utilities/test-utilities-assertions/browser-ui-interaction/component-interaction-testing/component-state-manipulators.md) — Allows direct modification of a component's internal state and props to test view updates.
- [React Testing Utilities](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/testing-frameworks/unit/react-testing-utilities.md) — Provides specialized helpers for rendering, querying, and interacting with React components during unit tests.
- [UI Event Simulators](https://awesome-repositories.com/f/testing-quality-assurance/synthetic-traffic-generators/ui-event-simulators.md) — Triggers simulated events on rendered elements to validate the execution of component logic and handlers.

### Education & Learning Resources

- [Rendered Tree Querying](https://awesome-repositories.com/f/education-learning-resources/technical-domain-education/technical-academic-domains/algorithmic-design-analysis/tree-data-structures/tree-traversal-utilities/rendered-tree-querying.md) — Searches for specific elements within a rendered tree using selectors to verify presence and quantity. ([source](https://cdn.jsdelivr.net/gh/enzymejs/enzyme@main/README.md))

### Software Engineering & Architecture

- [Component Tree Selectors](https://awesome-repositories.com/f/software-engineering-architecture/tree-traversal-algorithms/document-tree-traversers/component-tree-selectors.md) — Implements selector-based tree traversal to locate and verify specific elements in the rendered output.
- [UI Framework Adapters](https://awesome-repositories.com/f/software-engineering-architecture/ui-framework-adapters.md) — Provides a pluggable adapter system to maintain compatibility across different versions of the React framework.

### User Interface & Experience

- [Shallow Renderers](https://awesome-repositories.com/f/user-interface-experience/component-rendering-engines/shallow-renderers.md) — Provides a shallow rendering engine to isolate the top-level component for unit testing.
- [Synthetic Event Bridges](https://awesome-repositories.com/f/user-interface-experience/interaction-event-handlers/synthetic-event-bridges.md) — Synthesizes mock interaction events to verify that component event handlers execute correctly.
- [State Transition Validations](https://awesome-repositories.com/f/user-interface-experience/component-utilities/ui-frameworks/component-apis/component-prop-validation/state-transition-validations.md) — Enables checking that internal state and properties update correctly in response to triggers or props.

### Web Development

- [Render Tree Analysis](https://awesome-repositories.com/f/web-development/frontend-development-tools/frontend-frameworks/rendering-engines/react-renderers/render-tree-analysis.md) — Provides tools for searching and querying the generated React render tree to ensure element presence.
- [State Response Testers](https://awesome-repositories.com/f/web-development/react-state-bindings/state-response-testers.md) — Allows updating component properties and props to verify the user interface response to data changes.

### Part of an Awesome List

- [React Ecosystem](https://awesome-repositories.com/f/awesome-lists/devtools/react-ecosystem.md) — A testing utility for React to assert component output.
