This commit is contained in:
Alejandro Celaya 2024-05-13 19:10:55 +02:00
parent 679bf4dd3a
commit e350412f0d

View file

@ -1,4 +1,4 @@
import { run } from 'axe-core';
import axe from 'axe-core';
type ContainerWrapper = { container: HTMLElement };
@ -6,7 +6,7 @@ type AccessibilityTestSubject = ContainerWrapper | Promise<ContainerWrapper>;
export const checkAccessibility = async (subject: AccessibilityTestSubject) => {
const { container } = await subject;
const { violations } = await run(container);
const { violations } = await axe.run(container);
expect(violations).toStrictEqual([]);
};