Files
Jakub Michálek f2d73e5bee test(components): add a11y tests (#5181)
Co-authored-by: Jakub <jakub.michalek@freelo.io>
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-10-14 13:56:06 +02:00

26 lines
551 B
TypeScript

import * as matchers from 'vitest-axe/matchers'
import { expect } from 'vitest'
import { configureAxe } from 'vitest-axe'
// @ts-expect-error incomplete implementation
window.IntersectionObserver = class IntersectionObserver {
// eslint-disable-next-line
constructor() {}
observe() {}
unobserve() {}
disconnect() {}
}
configureAxe({
globalOptions: {
rules: [{
// Disable region rule as it doesn't work well with components rendered in isolation.
id: 'region',
enabled: false
}]
}
})
expect.extend(matchers)