mirror of
https://github.com/supabase/supabase.git
synced 2026-07-02 13:34:27 +08:00
* Run prettier on packages too. * Add the generated files for icons to prettierignore. * Format all files in the packages folder. * Minor fix.
26 lines
639 B
TypeScript
26 lines
639 B
TypeScript
/// <reference types="@testing-library/jest-dom" />
|
|
|
|
import '@testing-library/jest-dom/vitest'
|
|
import { cleanup } from '@testing-library/react'
|
|
import { afterEach, vi } from 'vitest'
|
|
|
|
Object.defineProperty(window, 'matchMedia', {
|
|
writable: true,
|
|
value: vi.fn().mockImplementation((query) => ({
|
|
matches: false,
|
|
media: query,
|
|
onchange: null,
|
|
addListener: vi.fn(), // deprecated
|
|
removeListener: vi.fn(), // deprecated
|
|
addEventListener: vi.fn(),
|
|
removeEventListener: vi.fn(),
|
|
dispatchEvent: vi.fn(),
|
|
})),
|
|
})
|
|
|
|
vi.mock('next/navigation', () => require('next-router-mock'))
|
|
|
|
afterEach(() => {
|
|
cleanup()
|
|
})
|