From 38b8d4df5a365e2ec01eb84f80c884cc5e9900b1 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Mon, 13 May 2024 19:16:52 +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 e2fd80e..9378b66 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([]); };