From e350412f0daefa03b16cc627efb98edf20a6ac92 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Mon, 13 May 2024 19:10:55 +0200 Subject: [PATCH] Import full axe object to work around https://github.com/dequelabs/axe-core/issues/4458 --- test/__helpers__/accessibility.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/__helpers__/accessibility.ts b/test/__helpers__/accessibility.ts index e2fd80e0..9378b66f 100644 --- a/test/__helpers__/accessibility.ts +++ b/test/__helpers__/accessibility.ts @@ -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; export const checkAccessibility = async (subject: AccessibilityTestSubject) => { const { container } = await subject; - const { violations } = await run(container); + const { violations } = await axe.run(container); expect(violations).toStrictEqual([]); };