fix(Toast): icon-size prop should affect loading icon (#8339)

This commit is contained in:
neverland
2021-03-14 11:52:28 +08:00
committed by GitHub
parent 7a14991b16
commit ca9ec7e1bd
3 changed files with 20 additions and 4 deletions
+14
View File
@@ -74,3 +74,17 @@ test('should change icon size when using icon-size prop', async () => {
await later();
expect(wrapper.find('.van-icon').style.fontSize).toEqual('10px');
});
test('should change loading icon size when using icon-size prop', async () => {
const wrapper = mount(Toast, {
props: {
show: true,
type: 'loading',
iconSize: '10',
},
});
await later();
expect(wrapper.find('.van-loading__spinner').style.width).toEqual('10px');
expect(wrapper.find('.van-loading__spinner').style.height).toEqual('10px');
});