mirror of
https://github.com/hanzoai/vitest.git
synced 2026-09-24 17:04:25 +00:00
26 lines
413 B
TypeScript
26 lines
413 B
TypeScript
import { test, expect } from "vitest"
|
|
|
|
// pnpm -C test/snapshots test:fixtures --root test/fixtures/file
|
|
|
|
test('white space', async () => {
|
|
await expect(`
|
|
|
|
white space
|
|
`).toMatchFileSnapshot('snapshot-1.txt')
|
|
})
|
|
|
|
test('indent', async () => {
|
|
await expect(`\
|
|
example: |
|
|
{
|
|
echo "hello"
|
|
}
|
|
some:
|
|
nesting:
|
|
- "hello world"
|
|
even:
|
|
more:
|
|
nesting: true
|
|
`).toMatchFileSnapshot('snapshot-2.txt')
|
|
})
|