File tree 1 file changed +27
-0
lines changed
packages/runtime-core/__tests__
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -1050,4 +1050,31 @@ describe('SSR hydration', () => {
1050
1050
expect ( `Hydration children mismatch` ) . toHaveBeenWarned ( )
1051
1051
} )
1052
1052
} )
1053
+
1054
+ // #6008
1055
+ describe ( 'hydrate Static vnode' , ( ) => {
1056
+ test ( 'domType is ELEMENT should match' , ( ) => {
1057
+ const html = ` A <wbr> <code>0</code> <wbr> B <wbr> <code>1</code> C <code>2</code> <wbr> D <wbr> <code>E</code>`
1058
+ const { vnode, container } = mountWithHydration ( html , ( ) =>
1059
+ createStaticVNode (
1060
+ ` A <wbr> <code>0</code> <wbr> B <wbr> <code>1</code> C <code>2</code> <wbr> D <wbr> <code>E</code>` ,
1061
+ 18
1062
+ )
1063
+ )
1064
+ expect ( vnode . el ) . toBe ( container . firstChild )
1065
+ expect ( `Hydration node mismatch` ) . not . toHaveBeenWarned ( )
1066
+ } )
1067
+
1068
+ test ( 'domType is TEXT should match' , ( ) => {
1069
+ const html = `<wbr>A<wbr><code>0</code> <wbr> B <wbr> <code>1</code> C <code>2</code> <wbr> D <wbr> <code>E</code>`
1070
+ const { vnode, container } = mountWithHydration ( html , ( ) =>
1071
+ createStaticVNode (
1072
+ `<wbr>A<wbr><code>0</code> <wbr> B <wbr> <code>1</code> C <code>2</code> <wbr> D <wbr> <code>E</code>` ,
1073
+ 18
1074
+ )
1075
+ )
1076
+ expect ( vnode . el ) . toBe ( container . firstChild )
1077
+ expect ( `Hydration node mismatch` ) . not . toHaveBeenWarned ( )
1078
+ } )
1079
+ } )
1053
1080
} )
You can’t perform that action at this time.
0 commit comments