We can add accessibility testing to our jest
unit tests with jest-axe
which gives us:
Here we'll see how to use jest-axe
with react-testing-library
to render the components for jest-axe
to audit for accessibility.
The React Testing Library is a very light-weight solution for testing React components. It provides light utility functions on top of react-dom and react-dom/test-utils, in a way that encourages better testing practices.