mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 11:54:02 +00:00
feat(Stepper): add name prop (#4931)
This commit is contained in:
@@ -229,3 +229,16 @@ test('should limit decimal-length when input', () => {
|
||||
|
||||
expect(input.element.value).toEqual('1.2');
|
||||
});
|
||||
|
||||
test('name prop', () => {
|
||||
const wrapper = mount(Stepper);
|
||||
|
||||
const plus = wrapper.find('.van-stepper__plus');
|
||||
|
||||
plus.trigger('click');
|
||||
expect(wrapper.emitted('change')[0][1]).toEqual({ name: '' });
|
||||
|
||||
wrapper.setProps({ name: 'name' });
|
||||
plus.trigger('click');
|
||||
expect(wrapper.emitted('change')[1][1]).toEqual({ name: 'name' });
|
||||
});
|
||||
|
Reference in New Issue
Block a user