Top "Enzyme" questions

Unit test library for React.

Redux: How to test a connected component?

I am using Enzyme to unit test my React components. I understand that in order to test the raw unconnected …

unit-testing reactjs redux enzyme
Where should the enzyme setup file be written?

Yesterday I upgraded my React project to v16.0, but I found that Enzyme had some problems Error: Enzyme Internal Error: …

reactjs enzyme
Why does my mock of my api return a 404 error?

I use axios-mock-adapter to mock my API, it works correctly but on one mock it returns a 404 error and I …

reactjs jestjs axios enzyme axios-mock-adapter
Difference between enzyme, ReactTestUtils and react-testing-library

What is the difference between enzyme, ReactTestUtils and react-testing-library for react testing? The ReactTestUtils documentation says: ReactTestUtils makes it easy …

reactjs enzyme react-testing-library
Jest/Enzyme ShallowWrapper is empty when creating Snapshot

So I'm writing a test for my Item component and I tried to render the ItemCard component and then use …

reactjs testing jestjs enzyme snapshot
How to simulate an event on a unit test with Jest, Enzyme for React-Native

I'm trying to figure out how to test an "onPress" event with Jest in a React-Native app so I can …

javascript unit-testing react-native jestjs enzyme
Components using Date objects produce different snapshots in different timezones

I'm using Enzyme with enzyme-to-json to do Jest snapshot testing of my React components. I'm testing shallow snapshots of a …

javascript reactjs jestjs enzyme
Redux How to update the store in unit tests?

Using enzyme, mocha and expect asserts. The aim of my unit test is to check that dispatch gets called with …

unit-testing reactjs redux mocha enzyme
Unit testing React click outside component

Using the code from this answer to solve clicking outside of a component: componentDidMount() { document.addEventListener('mousedown', this.handleClickOutside); } componentWillUnmount() { …

javascript unit-testing reactjs jestjs enzyme
Testing with React's Jest and Enzyme when async componentDidMount

react:16.3.0-alpha.1 jest: "22.3.0" enzyme: 3.3.0 typescript: 2.7.1 code: class Foo extends React.PureComponent<undefined,undefined>{ bar:number; async componentDidMount() { this.…

reactjs typescript jestjs enzyme