test: add test helper for accessibility

As proposed in #22343, the components can be automatically validated
for accessibility. This adds a test helper that runs Axe to check
for accessibility violations.
This commit is contained in:
Stef Schenkelaars
2021-12-02 13:25:31 +01:00
parent e49a451650
commit 98e36aa036
6 changed files with 24 additions and 0 deletions

1
typings/jest.d.ts vendored
View File

@@ -1,5 +1,6 @@
declare namespace jest {
interface Matchers<R> {
toMatchRenderedSnapshot(): R;
toHaveNoViolations(): R;
}
}