Skip to content

Commit aeb5fd6

Browse files
committed
fix: remove flaky spec
1 parent 8fcfdce commit aeb5fd6

File tree

1 file changed

+1
-38
lines changed

1 file changed

+1
-38
lines changed

test/specs/create-local-vue.spec.js

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ import VueRouter from 'vue-router'
44
import { createLocalVue } from 'packages/test-utils/src'
55
import Component from '~resources/components/component.vue'
66
import ComponentWithVuex from '~resources/components/component-with-vuex.vue'
7-
import ComponentWithRouter from '~resources/components/component-with-router.vue'
87
import ComponentWithSyncError from '~resources/components/component-with-sync-error.vue'
98
import ComponentWithAsyncError from '~resources/components/component-with-async-error.vue'
109
import { describeWithShallowAndMount, vueVersion } from '~resources/utils'
11-
import { itDoNotRunIf, itSkipIf } from 'conditional-specs'
10+
import { itSkipIf } from 'conditional-specs'
1211

1312
describeWithShallowAndMount('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

Comments
 (0)