[new feature] Popup: add open/close event (#2649)

This commit is contained in:
neverland
2019-01-30 19:39:29 +08:00
committed by GitHub
parent 079b582460
commit 466bb3ce1e
4 changed files with 15 additions and 1 deletions

View File

@@ -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();
});