@@ -1089,7 +1089,7 @@ describe('compiler: element transform', () => {
1089
1089
} )
1090
1090
} )
1091
1091
1092
- test ( 'HYDRATE_EVENTS ' , ( ) => {
1092
+ test ( 'NEED_HYDRATION for v-on ' , ( ) => {
1093
1093
// ignore click events (has dedicated fast path)
1094
1094
const { node } = parseWithElementTransform ( `<div @click="foo" />` , {
1095
1095
directiveTransforms : {
@@ -1108,12 +1108,24 @@ describe('compiler: element transform', () => {
1108
1108
}
1109
1109
)
1110
1110
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 ] )
1112
1124
)
1113
1125
} )
1114
1126
1115
1127
// #5870
1116
- test ( 'HYDRATE_EVENTS on dynamic component' , ( ) => {
1128
+ test ( 'NEED_HYDRATION on dynamic component' , ( ) => {
1117
1129
const { node } = parseWithElementTransform (
1118
1130
`<component :is="foo" @input="foo" />` ,
1119
1131
{
@@ -1123,7 +1135,7 @@ describe('compiler: element transform', () => {
1123
1135
}
1124
1136
)
1125
1137
expect ( node . patchFlag ) . toBe (
1126
- genFlagText ( [ PatchFlags . PROPS , PatchFlags . HYDRATE_EVENTS ] )
1138
+ genFlagText ( [ PatchFlags . PROPS , PatchFlags . NEED_HYDRATION ] )
1127
1139
)
1128
1140
} )
1129
1141
} )
0 commit comments