Added accessibility tests
This commit is contained in:
+7
-2
@@ -1,5 +1,10 @@
|
||||
import { injectAxe, checkA11y } from '@axe-core/playwright';
|
||||
import { injectAxe, checkA11y } from "@axe-core/playwright";
|
||||
|
||||
export async function runA11y(page, options = {}) {
|
||||
await injectAxe(page);
|
||||
await checkA11y(page, undefined, { detailedReport: true, detailedReportOptions: { html: true }, ...options });
|
||||
await checkA11y(page, undefined, {
|
||||
detailedReport: true,
|
||||
detailedReportOptions: { html: true },
|
||||
...options,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user