How to Catch a11y Defects During Unit and E2E Testing
summary
Adds automated a11y checks into unit tests with jest and into end-to-end tests with cypress using axe, on a small Studio Ghibli search app. Shows concrete changes: setup file with jest, adding types and a support import, and inject axe in Cypress beforeEach. Runs tests that deliberately fail and prints violations to the console so fixes target real issues. Asserts accessibility at component and page level with expect(...).toHaveNoViolations(), preventing late-stage regression.
AI-written summary · about








