DefinitelyTyped/types/jest-axe/jest-axe-tests.ts
2019-08-26 08:40:59 -07:00

21 lines
456 B
TypeScript

import { configureAxe, axe, toHaveNoViolations, JestAxe } from "jest-axe";
expect.extend(toHaveNoViolations);
const newJestWithDefaults: JestAxe = configureAxe();
const newJestWithOptions: JestAxe = configureAxe({
elementRef: false,
iframes: false,
rules: {},
runOnly: {
type: "rules",
},
selectors: false,
});
const sameJest: JestAxe = axe;
expect("").toHaveNoViolations();
expect(document.body).toHaveNoViolations();