File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
packages/runtime-core/__tests__/components Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -106,24 +106,20 @@ describe('renderer: teleport', () => {
106
106
const root = nodeOps . createElement ( 'div' )
107
107
const children = ref ( [ h ( 'div' , 'teleported' ) ] )
108
108
109
- render ( h ( Teleport , { to : target } , children . value ) , root )
109
+ render ( h ( ( ) => h ( Teleport , { to : target } , children . value ) ) , root )
110
110
expect ( serializeInner ( target ) ) . toMatchInlineSnapshot (
111
111
`"<div>teleported</div>"`
112
112
)
113
113
114
114
children . value = [ ]
115
115
await nextTick ( )
116
116
117
- expect ( serializeInner ( target ) ) . toMatchInlineSnapshot (
118
- `"<div>teleported</div>"`
119
- )
117
+ expect ( serializeInner ( target ) ) . toMatchInlineSnapshot ( `""` )
120
118
121
119
children . value = [ createVNode ( Text , null , 'teleported' ) ]
122
120
await nextTick ( )
123
121
124
- expect ( serializeInner ( target ) ) . toMatchInlineSnapshot (
125
- `"<div>teleported</div>"`
126
- )
122
+ expect ( serializeInner ( target ) ) . toMatchInlineSnapshot ( `"teleported"` )
127
123
} )
128
124
129
125
test ( 'should remove children when unmounted' , ( ) => {
You can’t perform that action at this time.
0 commit comments