File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
packages/runtime-core/__tests__ Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -1654,6 +1654,29 @@ describe('SSR hydration', () => {
1654
1654
expect ( `mismatch` ) . not . toHaveBeenWarned ( )
1655
1655
} )
1656
1656
1657
+ test ( 'transition appear work with pre-existing class' , ( ) => {
1658
+ const { vnode, container } = mountWithHydration (
1659
+ `<template><div class="foo">foo</div></template>` ,
1660
+ ( ) =>
1661
+ h (
1662
+ Transition ,
1663
+ { appear : true } ,
1664
+ {
1665
+ default : ( ) => h ( 'div' , { class : 'foo' } , 'foo' ) ,
1666
+ } ,
1667
+ ) ,
1668
+ )
1669
+ expect ( container . firstChild ) . toMatchInlineSnapshot ( `
1670
+ <div
1671
+ class="foo v-enter-from v-enter-active"
1672
+ >
1673
+ foo
1674
+ </div>
1675
+ ` )
1676
+ expect ( vnode . el ) . toBe ( container . firstChild )
1677
+ expect ( `mismatch` ) . not . toHaveBeenWarned ( )
1678
+ } )
1679
+
1657
1680
test ( 'transition appear with v-if' , ( ) => {
1658
1681
const show = false
1659
1682
const { vnode, container } = mountWithHydration (
You can’t perform that action at this time.
0 commit comments