mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-28 11:54:42 +00:00
13 lines
389 B
TypeScript
13 lines
389 B
TypeScript
// @vitest-environment happy-dom
|
|||
|
|
import { describe, it, expect } from 'vitest'
|
||
|
|
import './polyfills'
|
||
|
|
|
||
|
|
describe('polyfills', () => {
|
||
|
|
it('defines window.matchMedia polyfill when missing', () => {
|
||
|
|
expect(typeof window.matchMedia).toBe('function')
|
||
|
|
const mql = window.matchMedia('(prefers-color-scheme: dark)')
|
||
|
|
expect(mql).toBeDefined()
|
||
|
|
expect(mql.matches).toBe(false)
|
||
|
|
})
|
||
|
|
})
|