api-layer
api-layer copied to clipboard
Migrate UI unit tests from Enzyme to RTL
At the time Enzyme publishes "officially supported" adapters for React 0.13.x, 0.14.x, 15.x, and 16.x. These adapters are npm packages of the form enzyme-adapter-react-{{version}}
.
There is no official adapter for React 17 which we are using.
There is an unofficial adapter. The creator also wrote an article, where he highlights his concerns about future enzyme support, suggesting to rather migrate tests to RTL (React Testing Library).
Currently we adapted our unit tests to work even without the adapter. However we should move all UI unit tests to RTL, since Enzyme team is not working on the React 17 support.
This will mean changing tests in both API Catalog UI and Metrics Service.
Useful links: