test: add grid test

pull/22/head
tangjinzhou 2018-05-19 17:50:22 +08:00
parent a39aada80a
commit 54c695a7f4
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Grid should render Col 1`] = `<div class="ant-col-2"></div>`;
exports[`Grid should render Row 1`] = `<div class="ant-row"></div>`;

View File

@ -0,0 +1,17 @@
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()
})
})