mirror of
https://github.com/hanzoai/vitest.git
synced 2026-10-30 14:46:34 +00:00
29 lines
576 B
TypeScript
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()
|
|
})
|