mirror of
https://github.com/youzan/vant.git
synced 2025-10-15 23:55:08 +00:00
[Improvement] Toast: support Vue.use to register (#690)
This commit is contained in:
@@ -60,7 +60,7 @@ describe('Dialog', () => {
|
||||
expect(Dialog.currentOptions.title).to.equal('');
|
||||
});
|
||||
|
||||
it('register dialog component', () => {
|
||||
it('register component', () => {
|
||||
Vue.use(Dialog);
|
||||
expect(!!Vue.component('van-dialog')).to.be.true;
|
||||
});
|
||||
|
@@ -54,4 +54,9 @@ describe('ImagePreview', () => {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('register component', () => {
|
||||
Vue.use(ImagePreview);
|
||||
expect(!!Vue.component('van-image-preview')).to.be.true;
|
||||
});
|
||||
});
|
||||
|
@@ -1,3 +1,4 @@
|
||||
import Vue from 'vue';
|
||||
import Toast from 'packages/toast';
|
||||
|
||||
describe('Toast', () => {
|
||||
@@ -132,4 +133,9 @@ describe('Toast', () => {
|
||||
const toast2 = Toast(1);
|
||||
expect(toast2.duration).to.equal(3000);
|
||||
});
|
||||
|
||||
it('register component', () => {
|
||||
Vue.use(Toast);
|
||||
expect(!!Vue.component('van-toast')).to.be.true;
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user