mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
feat(Checkbox): icon slot add disabled param (#8839)
This commit is contained in:
@@ -105,3 +105,14 @@ test('should emit click event when checkbox icon is clicked', async () => {
|
||||
icon.trigger('click');
|
||||
expect(onClick).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
|
||||
test('should render icon slot correctly', async () => {
|
||||
const wrapper = mount(Checkbox, {
|
||||
slots: {
|
||||
icon: ({ checked, disabled }) =>
|
||||
`checked: ${checked}, disabled: ${disabled}`,
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper.find('.van-checkbox__icon').html()).toMatchSnapshot();
|
||||
});
|
||||
|
Reference in New Issue
Block a user