@@ -4,11 +4,10 @@ import VueRouter from 'vue-router'
44import { createLocalVue } from 'packages/test-utils/src'
55import Component from '~resources/components/component.vue'
66import ComponentWithVuex from '~resources/components/component-with-vuex.vue'
7- import ComponentWithRouter from '~resources/components/component-with-router.vue'
87import ComponentWithSyncError from '~resources/components/component-with-sync-error.vue'
98import ComponentWithAsyncError from '~resources/components/component-with-async-error.vue'
109import { describeWithShallowAndMount , vueVersion } from '~resources/utils'
11- import { itDoNotRunIf , itSkipIf } from 'conditional-specs'
10+ import { itSkipIf } from 'conditional-specs'
1211
1312describeWithShallowAndMount ( 'createLocalVue' , mountingMethod => {
1413 it ( 'installs Vuex without polluting global Vue' , ( ) => {
@@ -66,42 +65,6 @@ describeWithShallowAndMount('createLocalVue', mountingMethod => {
6665 expect ( typeof freshWrapper . vm . $route ) . toEqual ( 'undefined' )
6766 } )
6867
69- itDoNotRunIf (
70- mountingMethod . name === 'shallowMount' || vueVersion < 2.6 ,
71- 'Router should work properly with local Vue' ,
72- async ( ) => {
73- const localVue = createLocalVue ( )
74- localVue . use ( VueRouter )
75- const routes = [
76- {
77- path : '/' ,
78- component : {
79- render : h => h ( 'div' , 'home' )
80- }
81- } ,
82- {
83- path : '/foo' ,
84- component : {
85- render : h => h ( 'div' , 'foo' )
86- }
87- }
88- ]
89- const router = new VueRouter ( {
90- routes
91- } )
92- const wrapper = mountingMethod ( ComponentWithRouter , { localVue, router } )
93- expect ( wrapper . vm . $route ) . toBeTruthy ( )
94-
95- expect ( wrapper . text ( ) ) . toContain ( 'home' )
96-
97- await wrapper . find ( 'a' ) . trigger ( 'click' )
98- expect ( wrapper . text ( ) ) . toContain ( 'foo' )
99-
100- const freshWrapper = mountingMethod ( Component )
101- expect ( typeof freshWrapper . vm . $route ) . toEqual ( 'undefined' )
102- }
103- )
104-
10568 it ( 'use can take additional arguments' , ( ) => {
10669 const localVue = createLocalVue ( )
10770 const pluginOptions = { foo : 'bar' }
0 commit comments