mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
20 lines
500 B
JavaScript
20 lines
500 B
JavaScript
import { expect } from 'chai'
|
|
import { polyfill } from '../mod.js'
|
|
|
|
describe('Media', () => {
|
|
const target = {}
|
|
|
|
before(() => polyfill(target))
|
|
|
|
it('Includes MediaQueryList functionality', () => {
|
|
expect(target).to.have.property('MediaQueryList')
|
|
expect(target).to.have.property('matchMedia')
|
|
})
|
|
|
|
it('Supports matchMedia creation', () => {
|
|
const mql = target.matchMedia('(min-width: 640px)')
|
|
|
|
expect(mql.matches).to.equal(false)
|
|
expect(mql.media).to.equal('(min-width: 640px)')
|
|
})
|
|
})
|