mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-12 18:43:50 +00:00
Import full axe object to work around https://github.com/dequelabs/axe-core/issues/4458
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { run } from 'axe-core';
|
import axe from 'axe-core';
|
||||||
|
|
||||||
type ContainerWrapper = { container: HTMLElement };
|
type ContainerWrapper = { container: HTMLElement };
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@ type AccessibilityTestSubject = ContainerWrapper | Promise<ContainerWrapper>;
|
|||||||
|
|
||||||
export const checkAccessibility = async (subject: AccessibilityTestSubject) => {
|
export const checkAccessibility = async (subject: AccessibilityTestSubject) => {
|
||||||
const { container } = await subject;
|
const { container } = await subject;
|
||||||
const { violations } = await run(container);
|
const { violations } = await axe.run(container);
|
||||||
|
|
||||||
expect(violations).toStrictEqual([]);
|
expect(violations).toStrictEqual([]);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user