mirror of https://github.com/vuejs/core.git
test: update tests for deprecations
This commit is contained in:
parent
7670bb9a3f
commit
1849b9940f
|
@ -998,7 +998,7 @@ describe('compiler: element transform', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
test('NEED_PATCH (vnode hooks)', () => {
|
test('NEED_PATCH (vnode hooks)', () => {
|
||||||
const root = baseCompile(`<div @vnodeUpdated="foo" />`, {
|
const root = baseCompile(`<div @vue:updated="foo" />`, {
|
||||||
prefixIdentifiers: true,
|
prefixIdentifiers: true,
|
||||||
cacheHandlers: true
|
cacheHandlers: true
|
||||||
}).ast
|
}).ast
|
||||||
|
@ -1184,6 +1184,7 @@ describe('compiler: element transform', () => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// TODO remove in 3.4
|
||||||
test('v-is', () => {
|
test('v-is', () => {
|
||||||
const { node, root } = parseWithBind(`<div v-is="'foo'" />`)
|
const { node, root } = parseWithBind(`<div v-is="'foo'" />`)
|
||||||
expect(root.helpers).toContain(RESOLVE_DYNAMIC_COMPONENT)
|
expect(root.helpers).toContain(RESOLVE_DYNAMIC_COMPONENT)
|
||||||
|
@ -1201,6 +1202,7 @@ describe('compiler: element transform', () => {
|
||||||
// should skip v-is runtime check
|
// should skip v-is runtime check
|
||||||
directives: undefined
|
directives: undefined
|
||||||
})
|
})
|
||||||
|
expect('v-is="component-name" has been deprecated').toHaveBeenWarned()
|
||||||
})
|
})
|
||||||
|
|
||||||
// #3934
|
// #3934
|
||||||
|
|
|
@ -438,6 +438,7 @@ describe('compiler: transform v-on', () => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// TODO remove in 3.4
|
||||||
test('case conversion for vnode hooks', () => {
|
test('case conversion for vnode hooks', () => {
|
||||||
const { node } = parseWithVOn(`<div v-on:vnode-mounted="onMount"/>`)
|
const { node } = parseWithVOn(`<div v-on:vnode-mounted="onMount"/>`)
|
||||||
expect((node.codegenNode as VNodeCall).props).toMatchObject({
|
expect((node.codegenNode as VNodeCall).props).toMatchObject({
|
||||||
|
@ -452,6 +453,7 @@ describe('compiler: transform v-on', () => {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
expect('@vnode-* hooks in templates are deprecated').toHaveBeenWarned()
|
||||||
})
|
})
|
||||||
|
|
||||||
test('vue: prefixed events', () => {
|
test('vue: prefixed events', () => {
|
||||||
|
|
Loading…
Reference in New Issue