one of the things I still find very useful is the ability to test that a component has been rendered. Not the final HTML but the component.
For example, you have the main App component that renders UserList. With react-testing-library you will have a test.
function App() {
return (
<...>
<UserList />
</...>
);
}const { getByText } = render(<App />);
const linkElement = getByText(/Users/i);
expect(linkElement).toBeInTheDocument();
vs
expect(wrapper.find(UserList).length).toEqual(1);
Looking into `App` component you cannot even guess a correct expectation for the test. You need to look inside UserList. But what happens if the next day I want to remove or update “Users” header inside UserList. My App test will fail.
Enzyme is a kind of unit testing. You don’t need to test other units you consider that UserList has its own test for that.