feat: add tests

This commit is contained in:
jiangruowei
2017-03-17 18:07:13 +08:00
parent b3fb1616c8
commit 1ddc46e395
7 changed files with 105 additions and 92 deletions

View File

@@ -1,16 +1,17 @@
import { createVue } from '../creater';
import CellGroup from 'packages/cell-group';
import { mount } from 'avoriaz';
describe('Cell', () => {
let vm;
describe('CellGroup', () => {
let wrapper;
afterEach(() => {
vm && vm.destroy();
wrapper && wrapper.destroy();
});
it('cell group create', () => {
vm = createVue(CellGroup);
vm.mount();
it('create', () => {
wrapper = mount(CellGroup, {
propsData: {}
});
expect(vm.el.classList.contains('zan-cell-group')).to.true;
expect(wrapper.hasClass('zan-cell-group')).to.be.true;
});
});