Getting the most out of jest-axe
Jest-axe is a custom matcher (the bit that does the checking in your test) for testing accessibility. It’s a handy way to catch a11y errors in our components.
To get the most value from it, though, we need to be a little careful about how we use it.
We’ll go from ‘iHaveNoIdea’ to ‘toHaveNoViolations’ in 20 minutes.
Steve Barnett
November 10, 2021