Merge branch 'master' into hotfix/unit_test_init

This commit is contained in:
pangxie1991
2017-03-03 15:12:45 +08:00
55 changed files with 8471 additions and 41259 deletions

View File

@@ -14,7 +14,7 @@ describe('Switch', () => {
vm.mount();
expect(vm.el.classList.contains('zan-switch')).to.true;
expect(vm.el.classList.contains('is-on')).to.true;
expect(vm.el.classList.contains('zan-switch--on')).to.true;
});
it('create off switch', () => {
@@ -42,11 +42,11 @@ describe('Switch', () => {
});
vm.mount();
expect(vm.el.classList.contains('zan-switch')).to.true;
expect(vm.el.classList.contains('is-off')).to.true;
expect(vm.el.classList.contains('zan-switch--off')).to.true;
vm.el.click();
setTimeout(() => {
expect(vm.el.classList.contains('is-off')).to.true;
expect(vm.el.classList.contains('zan-switch--off')).to.true;
done();
});
});
@@ -72,11 +72,11 @@ describe('Switch', () => {
});
vm.mount();
expect(vm.el.classList.contains('zan-switch')).to.true;
expect(vm.el.classList.contains('is-off')).to.true;
expect(vm.el.classList.contains('zan-switch--off')).to.true;
vm.el.click();
setTimeout(() => {
expect(vm.el.classList.contains('is-on')).to.true;
expect(vm.el.classList.contains('zan-switch--on')).to.true;
done();
});
});