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

17 lines
605 B
TypeScript

import { expect, test } from 'vitest'
test('toMatchSnapshot', () => {
expect.soft('--snap-1--').toMatchSnapshot()
expect.soft('--snap-2--').toMatchSnapshot()
})
test('toMatchFileSnapshot', async () => {
await expect.soft('--file-1--').toMatchFileSnapshot('./__snapshots__/custom1.txt')
await expect.soft('--file-2--').toMatchFileSnapshot('./__snapshots__/custom2.txt')
})
test('toThrowErrorMatchingSnapshot', () => {
expect.soft(() => { throw new Error('--error-1--') }).toThrowErrorMatchingSnapshot()
expect.soft(() => { throw new Error('--error-2--') }).toThrowErrorMatchingSnapshot()
})