types: test cases typing

This commit is contained in:
chenjiahan
2021-02-11 13:04:00 +08:00
parent 7a5fb894d2
commit e2e0f66fe6
87 changed files with 129 additions and 121 deletions
@@ -1,5 +1,5 @@
import Switch from '..';
import { mount } from '@vue/test-utils';
import { mount } from '../../../test';
test('should emit update:modelValue event when click the switch button', async () => {
const wrapper = mount(Switch);
@@ -47,7 +47,7 @@ test('should change active color when using active-color prop', () => {
},
});
expect(wrapper.element.style.backgroundColor).toEqual('black');
expect(wrapper.style.backgroundColor).toEqual('black');
});
test('should change inactive color when using inactive-color prop', () => {
@@ -57,7 +57,7 @@ test('should change inactive color when using inactive-color prop', () => {
},
});
expect(wrapper.element.style.backgroundColor).toEqual('black');
expect(wrapper.style.backgroundColor).toEqual('black');
});
test('should apply active color to loading icon', () => {
@@ -92,7 +92,7 @@ test('should change size when using size prop', () => {
},
});
expect(wrapper.element.style.fontSize).toEqual('20px');
expect(wrapper.style.fontSize).toEqual('20px');
});
test('should allow to custom active-value and inactive-value', () => {