Skip to content

Commit b167d3e

Browse files
committed
test: only test class component on Vue 2.3+
1 parent 562fd33 commit b167d3e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/unit/specs/mount/Wrapper/html.spec.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { compileToFunctions } from 'vue-template-compiler'
22
import { mount } from '~vue-test-utils'
33
import Component from '~resources/components/component.vue'
44
import ComponentAsAClass from '~resources/components/component-as-a-class.vue'
5+
import { vueVersion } from '~resources/test-utils'
56

67
describe('html', () => {
78
it('returns a VueWrappers HTML as a string', () => {
@@ -24,7 +25,10 @@ describe('html', () => {
2425
expect(wrapper.html()).to.equal(expectedHtml)
2526
})
2627

27-
it('class component', () => {
28+
it('handles class component', () => {
29+
if(vueVersion < 2.3) {
30+
return
31+
}
2832
const wrapper = mount(ComponentAsAClass)
2933
expect(wrapper.html()).to.equal('<div></div>')
3034
})

0 commit comments

Comments
 (0)