Skip to content

Commit e10c8e7

Browse files
Improve code coverage
1 parent bc2c66f commit e10c8e7

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import IonVueRouter from './components/ion-vue-router.vue'
44
let globalVue = null
55
let globalVueRouter = null
66

7-
if (typeof window !== 'undefined') {
7+
if (typeof window !== 'undefined' && window.Vue !== undefined) {
88
globalVue = window.Vue
99
globalVueRouter = window.VueRouter
1010
} else if (typeof global !== 'undefined') {

test/router.node.spec.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import Vue from 'vue'
2+
3+
describe('asd', () => {
4+
it('qqq', () => {
5+
window.Vue = undefined
6+
global.Vue = Vue
7+
require('../src/router.js')
8+
})
9+
})

0 commit comments

Comments
 (0)