Files
2026-05-11 17:46:13 +02:00

29 lines
576 B
TypeScript

import { expect, test } from 'vitest'
test('simple heading and paragraph', () => {
document.body.innerHTML = `
<h1>Hello World</h1>
<p>
Some
<br/>
description
</p>
`
expect(document.body).toMatchAriaSnapshot()
})
test('semantic match with regex in snapshot', () => {
document.body.innerHTML = `
<p>Original</p>
<button aria-label="1234">Pattern</button>
`
expect(document.body).toMatchAriaSnapshot()
})
test("empty", () => {
document.body.innerHTML = `
<button aria-hidden="true">Hidden</button>
`
expect(document.body).toMatchAriaSnapshot()
})