mirror of
https://github.com/zhigang1992/react.git
synced 2026-04-28 12:15:32 +08:00
style(prettier): format code style
This commit is contained in:
@@ -8,29 +8,38 @@ describe('Col', () => {
|
||||
expect(wrapper).toMatchSnapshot()
|
||||
expect(() => wrapper.unmount()).not.toThrow()
|
||||
})
|
||||
|
||||
|
||||
it('should work with span and offset', () => {
|
||||
const wrapper = render(
|
||||
<div>
|
||||
<Col span={2}>col</Col>
|
||||
<Col span={2} offset={2}>col</Col>
|
||||
</div>
|
||||
<Col span={2} offset={2}>
|
||||
col
|
||||
</Col>
|
||||
</div>,
|
||||
)
|
||||
expect(wrapper).toMatchSnapshot()
|
||||
})
|
||||
|
||||
|
||||
it('should render correctly when nested', () => {
|
||||
const wrapper = mount(<Col><Col><Col />col</Col></Col>)
|
||||
const wrapper = mount(
|
||||
<Col>
|
||||
<Col>
|
||||
<Col />
|
||||
col
|
||||
</Col>
|
||||
</Col>,
|
||||
)
|
||||
expect(() => wrapper.unmount()).not.toThrow()
|
||||
})
|
||||
|
||||
|
||||
it('should render different components', () => {
|
||||
let wrapper = mount(<Col component="p" />)
|
||||
expect(wrapper.find('p').length).not.toBe(0)
|
||||
|
||||
|
||||
wrapper = mount(<Col component="details" />)
|
||||
expect(wrapper.find('details').length).not.toBe(0)
|
||||
|
||||
|
||||
wrapper = mount(<Col component="h1" />)
|
||||
expect(wrapper.find('h1').length).not.toBe(0)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user