test: update tests for deprecations

This commit is contained in:
Evan You 2023-04-21 16:06:08 +08:00
parent 7670bb9a3f
commit 1849b9940f
2 changed files with 5 additions and 1 deletions

View File

@ -998,7 +998,7 @@ describe('compiler: element transform', () => {
})
test('NEED_PATCH (vnode hooks)', () => {
const root = baseCompile(`<div @vnodeUpdated="foo" />`, {
const root = baseCompile(`<div @vue:updated="foo" />`, {
prefixIdentifiers: true,
cacheHandlers: true
}).ast
@ -1184,6 +1184,7 @@ describe('compiler: element transform', () => {
})
})
// TODO remove in 3.4
test('v-is', () => {
const { node, root } = parseWithBind(`<div v-is="'foo'" />`)
expect(root.helpers).toContain(RESOLVE_DYNAMIC_COMPONENT)
@ -1201,6 +1202,7 @@ describe('compiler: element transform', () => {
// should skip v-is runtime check
directives: undefined
})
expect('v-is="component-name" has been deprecated').toHaveBeenWarned()
})
// #3934

View File

@ -438,6 +438,7 @@ describe('compiler: transform v-on', () => {
})
})
// TODO remove in 3.4
test('case conversion for vnode hooks', () => {
const { node } = parseWithVOn(`<div v-on:vnode-mounted="onMount"/>`)
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', () => {