absolutely massive typescript porting time

This commit is contained in:
41666 2019-06-02 18:58:15 -05:00
parent 01f238f515
commit 30d08a630f
No known key found for this signature in database
GPG key ID: BC51D07640DC10AF
159 changed files with 2563 additions and 3861 deletions

View file

@ -0,0 +1,23 @@
/**
* @jest-environment jsdom
*/
/* eslint-env jest */
import * as React from 'react'
import { shallow } from 'enzyme'
import RoleDemo from '../demo'
import 'jest-styled-components'
describe('<RoleDemo />', () => {
it('renders', () => {
const demo = shallow(<RoleDemo role={{ name: 'test demo role', color: '#ffffff' }} />)
expect(demo).toMatchSnapshot()
})
it('changes state when clicked', () => {
const el = <RoleDemo role={{ name: 'test demo role', color: '#ffffff' }} />
const demo = shallow<typeof el>(el)
expect(demo.state().active).toEqual(false)
demo.dive().simulate('click')
expect(demo.state().active).toEqual(true)
})
})