test: test for compat mode v3 render fn detection
This commit is contained in:
parent
8dbad83e7f
commit
b6cc8640c5
@ -236,4 +236,19 @@ describe('compat: render function', () => {
|
||||
deprecationData[DeprecationTypes.RENDER_FUNCTION].message
|
||||
).toHaveBeenWarned()
|
||||
})
|
||||
|
||||
test('should detect v3 compiled render fn', () => {
|
||||
const vm = new Vue({
|
||||
data() {
|
||||
return {
|
||||
a: 'hello'
|
||||
}
|
||||
},
|
||||
// check is arg length based
|
||||
render(c: any, _c: any) {
|
||||
return createVNode('div', null, c.a)
|
||||
}
|
||||
}).$mount()
|
||||
expect(vm.$el.outerHTML).toBe(`<div>hello</div>`)
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user