jest-axe

A library that runs axe-core in Jest-style tests and adds the toHaveNoViolations matcher.

In more detail

A test renders a component, calls axe on the container and asserts expect(results).toHaveNoViolations(). The failure message lists each violation, so accessibility regressions fail the test run.

Related terms

Taught in

References