koel/resources/assets/js/__tests__/setup.ts

12 lines
309 B
TypeScript
Raw Normal View History

import vueSnapshotSerializer from 'jest-serializer-vue'
2022-07-10 14:19:11 +00:00
import { expect, vi } from 'vitest'
expect.addSnapshotSerializer(vueSnapshotSerializer)
2022-07-10 14:19:11 +00:00
global.ResizeObserver = global.ResizeObserver ||
vi.fn().mockImplementation(() => ({
disconnect: vi.fn(),
observe: vi.fn(),
unobserve: vi.fn()
}))