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