summaryrefslogtreecommitdiff
path: root/src/sunlight-theme.test.js
blob: da207db52937f9d9bc6d3a0efca2e2a27ab8e757 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { SunlightTheme } from './sunlight-theme'
import { render } from 'react-testing-library'
import React from 'react'

global.navigator.geolocation = {
  getCurrentPosition: jest.fn(),
  watchPosition: jest.fn()
}

describe('SunlightTheme', () => {
  test('Invalid middleware', () => {
    const r = () => render(<SunlightTheme middleware={[5, 'yo']} />)
    expect(r).toThrow(Error)
  })
})