mirror of
https://github.com/bendtherules/react-fiber-traverse.git
synced 2026-08-18 22:01:49 +00:00
22 lines
515 B
TypeScript
22 lines
515 B
TypeScript
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()
|
|
})
|
|
})
|