mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
[new feature] Popup: add open/close event (#2649)
This commit is contained in:
@@ -141,3 +141,11 @@ test('close on click modal', () => {
|
||||
modal.click();
|
||||
expect(wrapper.vm.value).toBeFalsy();
|
||||
});
|
||||
|
||||
test('oepn & close event', () => {
|
||||
wrapper = mount(Popup);
|
||||
wrapper.vm.value = true;
|
||||
expect(wrapper.emitted('open')).toBeTruthy();
|
||||
wrapper.vm.value = false;
|
||||
expect(wrapper.emitted('close')).toBeTruthy();
|
||||
});
|
||||
|
Reference in New Issue
Block a user