rofrischmann/react-look

View on GitHub
packages/react-look/test/utils/isMediaQuery-test.js

Summary

Maintainability
B
4 hrs
Test Coverage
import isMediaQuery from '../../modules/utils/isMediaQuery'

describe('Validating media queries', () => {

  it('should return true', () => {
    expect(isMediaQuery('@media (min-height: 300px)')).to.eql(true)
  })

  it('should return false', () => {
    expect(isMediaQuery(':hover')).to.eql(false)
    expect(isMediaQuery('media')).to.eql(false)
    expect(isMediaQuery(' @media ()')).to.eql(false)
  })
})