fix(runtime-core): stricter compat root mount check
This commit is contained in:
@@ -298,12 +298,10 @@ describe('renderer: component', () => {
|
||||
})
|
||||
|
||||
test('the component VNode should be cloned when reusing it', () => {
|
||||
const Child = {
|
||||
setup(props: any, { slots }: SetupContext) {
|
||||
return () => {
|
||||
const c = slots.default!()
|
||||
return [c, c, c]
|
||||
}
|
||||
const App = {
|
||||
render() {
|
||||
const c = [h(Comp)]
|
||||
return [c, c, c]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -315,14 +313,6 @@ describe('renderer: component', () => {
|
||||
}
|
||||
}
|
||||
|
||||
const App = {
|
||||
setup() {
|
||||
return () => {
|
||||
return h(Child, () => [h(Comp)])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const root = nodeOps.createElement('div')
|
||||
render(h(App), root)
|
||||
expect(serializeInner(root)).toBe(`<h1></h1><h1></h1><h1></h1>`)
|
||||
|
||||
Reference in New Issue
Block a user