mirror of
https://github.com/vitest-dev/vitest.git
synced 2026-01-25 16:48:18 +00:00
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Vladimir Sheremet <sleuths.slews0s@icloud.com>
16 lines
380 B
TypeScript
16 lines
380 B
TypeScript
import { readFileSync } from 'node:fs'
|
|
import { expect, test } from 'vitest'
|
|
import { toMatchImageSnapshot } from 'jest-image-snapshot'
|
|
|
|
declare module 'vitest' {
|
|
interface Assertion<T> {
|
|
toMatchImageSnapshot(): T
|
|
}
|
|
}
|
|
|
|
expect.extend({ toMatchImageSnapshot })
|
|
|
|
test('image snapshot', () => {
|
|
expect(readFileSync('./test/stubs/input-image.png')).toMatchImageSnapshot()
|
|
})
|