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 Checkbox from 'packages/checkbox';
import { mount } from 'avoriaz';
describe('Checkbox', () => {
let vm;
let wrapper;
afterEach(() => {
vm && vm.destroy();
wrapper && wrapper.destroy();
});
it('create', () => {
vm = createVue(Checkbox);
vm.mount();
wrapper = mount(Checkbox, {
propsData: {}
});
expect(vm.el.classList.contains('zan-checkbox')).to.true;
expect(wrapper.hasClass('zan-checkbox')).to.be.true;
});
});