mirror of
https://github.com/Donkie/Spoolman.git
synced 2026-10-22 01:52:17 -05:00
Adds an npm run audit:a11y target that runs axe-core (WCAG 2.0/2.1 A+AA plus the 2.2 target-size rule) and a custom tap-target measurement across the main surfaces under Pixel 5 emulation, reusing the dev server on 5174. Results are aggregated to a11y-report.md via globalTeardown so they survive Playwright worker restarts.
11 lines
439 B
TypeScript
11 lines
439 B
TypeScript
import { rm, mkdir } from 'node:fs/promises';
|
|
import { SURFACES_DIR, REPORT_PATH } from './report';
|
|
|
|
// Runs once before the suite: clear any per-surface results and the report from
|
|
// a previous run so the new report reflects only this run.
|
|
export default async function globalSetup() {
|
|
await rm(SURFACES_DIR, { recursive: true, force: true });
|
|
await rm(REPORT_PATH, { force: true });
|
|
await mkdir(SURFACES_DIR, { recursive: true });
|
|
}
|