@@ -1089,7 +1089,7 @@ describe('compiler: element transform', () => {
10891089 } )
10901090 } )
10911091
1092- test ( 'HYDRATE_EVENTS ' , ( ) => {
1092+ test ( 'NEED_HYDRATION for v-on ' , ( ) => {
10931093 // ignore click events (has dedicated fast path)
10941094 const { node } = parseWithElementTransform ( `<div @click="foo" />` , {
10951095 directiveTransforms : {
@@ -1108,12 +1108,24 @@ describe('compiler: element transform', () => {
11081108 }
11091109 )
11101110 expect ( node2 . patchFlag ) . toBe (
1111- genFlagText ( [ PatchFlags . PROPS , PatchFlags . HYDRATE_EVENTS ] )
1111+ genFlagText ( [ PatchFlags . PROPS , PatchFlags . NEED_HYDRATION ] )
1112+ )
1113+ } )
1114+
1115+ test ( 'NEED_HYDRATION for v-bind.prop' , ( ) => {
1116+ const { node } = parseWithBind ( `<div v-bind:id.prop="id" />` )
1117+ expect ( node . patchFlag ) . toBe (
1118+ genFlagText ( [ PatchFlags . PROPS , PatchFlags . NEED_HYDRATION ] )
1119+ )
1120+
1121+ const { node : node2 } = parseWithBind ( `<div .id="id" />` )
1122+ expect ( node2 . patchFlag ) . toBe (
1123+ genFlagText ( [ PatchFlags . PROPS , PatchFlags . NEED_HYDRATION ] )
11121124 )
11131125 } )
11141126
11151127 // #5870
1116- test ( 'HYDRATE_EVENTS on dynamic component' , ( ) => {
1128+ test ( 'NEED_HYDRATION on dynamic component' , ( ) => {
11171129 const { node } = parseWithElementTransform (
11181130 `<component :is="foo" @input="foo" />` ,
11191131 {
@@ -1123,7 +1135,7 @@ describe('compiler: element transform', () => {
11231135 }
11241136 )
11251137 expect ( node . patchFlag ) . toBe (
1126- genFlagText ( [ PatchFlags . PROPS , PatchFlags . HYDRATE_EVENTS ] )
1138+ genFlagText ( [ PatchFlags . PROPS , PatchFlags . NEED_HYDRATION ] )
11271139 )
11281140 } )
11291141 } )
0 commit comments