Init with yo typescript-react-lib

This commit is contained in:
2019-07-19 12:49:20 +05:30
commit 0ad6620437
35 changed files with 12942 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import { mount, ReactWrapper } from 'enzyme'
import * as React from 'react'
import C from '../src'
describe('Component', () => {
let container: HTMLDivElement
let wrapper: ReactWrapper
beforeEach(() => {
container = document.body.appendChild(document.createElement('div'))
})
afterEach(() => {
document.body.removeChild(container)
})
it('should render correctly', () => {
wrapper = mount(<C text="text" />, { attachTo: container })
expect(wrapper.html()).toMatchSnapshot()
})
})