ant-design-vue/components/grid/__tests__/index.test.js

34 lines
687 B
JavaScript
Raw Normal View History

2018-05-19 17:50:22 +08:00
import { mount } from '@vue/test-utils'
import { Col, Row } from '..'
describe('Grid', () => {
it('should render Col', () => {
const wrapper = mount(Col, {
propsData: {
span: 2,
},
})
expect(wrapper.html()).toMatchSnapshot()
})
it('should render Row', () => {
const wrapper = mount(Row)
expect(wrapper.html()).toMatchSnapshot()
})
2018-12-09 10:58:50 +08:00
it('renders wrapped Col correctly', () => {
const wrapper = mount({
render () {
return <Row gutter={20}>
<div>
<Col span='12' />
</div>
<Col span='12' />
</Row>
},
}
)
expect(wrapper.html()).toMatchSnapshot()
})
2018-05-19 17:50:22 +08:00
})