@@ -2,7 +2,7 @@ import { createLocalVue, config } from '~vue/test-utils'
2
2
import Vue from 'vue'
3
3
import Component from '~resources/components/component.vue'
4
4
import ComponentWithVuex from '~resources/components/component-with-vuex.vue'
5
- import { describeWithMountingMethods , vueVersion } from '~resources/utils'
5
+ import { describeWithMountingMethods } from '~resources/utils'
6
6
import { itDoNotRunIf } from 'conditional-specs'
7
7
8
8
describeWithMountingMethods ( 'options.mocks' , mountingMethod => {
@@ -42,26 +42,27 @@ describeWithMountingMethods('options.mocks', mountingMethod => {
42
42
expect ( HTML ) . contains ( 'http://test.com' )
43
43
} )
44
44
45
- itDoNotRunIf (
46
- vueVersion < 2.3 ,
47
- 'adds variables to extended components' , ( ) => {
48
- const TestComponent = Vue . extend ( {
49
- template : `
45
+ it ( 'adds variables to extended components' , ( ) => {
46
+ const extendedComponent = Vue . extend ( {
47
+ name : 'extended-component'
48
+ } )
49
+ const TestComponent = extendedComponent . extend ( {
50
+ template : `
50
51
<div>
51
52
{{$route.path}}
52
53
</div>
53
54
`
54
- } )
55
- const $route = { path : 'http://test.com' }
56
- const wrapper = mountingMethod ( TestComponent , {
57
- mocks : {
58
- $route
59
- }
60
- } )
61
- const HTML =
62
- mountingMethod . name === 'renderToString' ? wrapper : wrapper . html ( )
63
- expect ( HTML ) . contains ( 'http://test.com' )
64
55
} )
56
+ const $route = { path : 'http://test.com' }
57
+ const wrapper = mountingMethod ( TestComponent , {
58
+ mocks : {
59
+ $route
60
+ }
61
+ } )
62
+ const HTML =
63
+ mountingMethod . name === 'renderToString' ? wrapper : wrapper . html ( )
64
+ expect ( HTML ) . contains ( 'http://test.com' )
65
+ } )
65
66
66
67
// render returns a string so reactive does not apply
67
68
itDoNotRunIf (
0 commit comments