Top "Enzyme" questions

Unit test library for React.

Enzyme is not finding component by props

I've got a component I'm testing with Enzyme that looks like the following: <RichTextEditor name="name" onChange={[Function]} value="&…

reactjs jsx enzyme
Testing a React component with Enzyme. Typescript can't find instance methods

I want to test a React class component. Let's say I have a method in my class that computes something …

reactjs typescript enzyme
How to write test case for ErrorBoundary in React using Jest / Enzyme

I have been trying (without success) to write a test case for ErrorBoundary component that is handling errors via componentDidCatch …

reactjs jestjs enzyme
Testing React portals with enzyme

So I'm having a hard time writing tests for a modal component using React fiber's portal. Because my modal mounts …

reactjs jestjs enzyme jsdom
Injecting react-intl object into mounted Enzyme components for testing

EDIT: Solved! Scroll down for the answer In our Component tests we need them to have access to the react-intl …

reactjs enzyme react-intl
enzyme not simulating change event on React Material-UI v1 - Select component

So I started with unit testing React components composed of Material-UI components using Jest and Enzyme setup. So far every …

reactjs material-ui enzyme jestjs react-dom
simulate for onClick not working in enzyme

This is a cancel button <div className="cancelFileBtn" onClick={this.props.cancelFileSending}> I need to simulate its click,…

reactjs mocha chai enzyme
Is componentDidMount supposed to run with shallow rendering in Enzyme?

From my understanding and from what I have read so far in various answers, not all lifecycle methods are supposed …

javascript reactjs unit-testing enzyme
How to spy on a class property arrow function using Jest

How can I spy on a class property arrow function using Jest? I have the following example test case which …

reactjs jestjs enzyme spy
Warning: An update to App inside a test was not wrapped in act(...) in enzyme and hooks

I have written this component. it fetchs data using hooks and state. Once it is fetched the loading state is …

reactjs jestjs react-hooks enzyme act