[bugfix] Toast: edundant instance when sync called multil times

This commit is contained in:
陈嘉涵
2019-06-06 11:19:19 +08:00
parent f898b61e44
commit f5059ea6ba
2 changed files with 9 additions and 2 deletions
+7
View File
@@ -1,4 +1,6 @@
import Vue from 'vue';
import Toast from '..';
import ToastVue from '../Toast';
import { transitionStub, later } from '../../../test/utils';
transitionStub();
@@ -86,3 +88,8 @@ test('onClose callback', () => {
Toast.allowMultiple(false);
expect(onClose).toHaveBeenCalledTimes(1);
});
test('register component', () => {
Vue.use(Toast);
expect(Vue.component(ToastVue.name)).toBeTruthy();
});