Skip to content

Commit 4683678

Browse files
committed
fix: test multiple plugins, mock global.console
1 parent 6fe2eb9 commit 4683678

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/unit/VueFinalModal.spec.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,13 +388,16 @@ describe('VueFinalModal.vue', () => {
388388

389389
describe('Plugin', () => {
390390
it('Register multiple plugins', async done => {
391+
global.console = { error: jest.fn() }
392+
const spy = jest.spyOn(global.console, 'error')
391393
const localVue = createLocalVue()
392394
localVue.use(VueFinalModal())
393395
localVue.use(VueFinalModal(), {
394396
componentName: 'VueFinalTest',
395397
dynamicContainerName: 'TestContainer',
396398
key: '$vtm'
397399
})
400+
expect(spy).toHaveBeenCalledTimes(0)
398401
done()
399402
})
400403
it('Register duplicate plugins', async done => {

0 commit comments

Comments
 (0)