mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-28 13:08:53 +03:00
16 lines
383 B
TypeScript
16 lines
383 B
TypeScript
|
import { 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()
|
||
|
}))
|
||
|
})
|