Skip to content

Commit 1849b99

Browse files
committed
test: update tests for deprecations
1 parent 7670bb9 commit 1849b99

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/compiler-core/__tests__/transforms/transformElement.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ describe('compiler: element transform', () => {
998998
})
999999

10001000
test('NEED_PATCH (vnode hooks)', () => {
1001-
const root = baseCompile(`<div @vnodeUpdated="foo" />`, {
1001+
const root = baseCompile(`<div @vue:updated="foo" />`, {
10021002
prefixIdentifiers: true,
10031003
cacheHandlers: true
10041004
}).ast
@@ -1184,6 +1184,7 @@ describe('compiler: element transform', () => {
11841184
})
11851185
})
11861186

1187+
// TODO remove in 3.4
11871188
test('v-is', () => {
11881189
const { node, root } = parseWithBind(`<div v-is="'foo'" />`)
11891190
expect(root.helpers).toContain(RESOLVE_DYNAMIC_COMPONENT)
@@ -1201,6 +1202,7 @@ describe('compiler: element transform', () => {
12011202
// should skip v-is runtime check
12021203
directives: undefined
12031204
})
1205+
expect('v-is="component-name" has been deprecated').toHaveBeenWarned()
12041206
})
12051207

12061208
// #3934

packages/compiler-core/__tests__/transforms/vOn.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ describe('compiler: transform v-on', () => {
438438
})
439439
})
440440

441+
// TODO remove in 3.4
441442
test('case conversion for vnode hooks', () => {
442443
const { node } = parseWithVOn(`<div v-on:vnode-mounted="onMount"/>`)
443444
expect((node.codegenNode as VNodeCall).props).toMatchObject({
@@ -452,6 +453,7 @@ describe('compiler: transform v-on', () => {
452453
}
453454
]
454455
})
456+
expect('@vnode-* hooks in templates are deprecated').toHaveBeenWarned()
455457
})
456458

457459
test('vue: prefixed events', () => {

0 commit comments

Comments
 (0)