fix(runtime-core): stricter compat root mount check

This commit is contained in:
Evan You
2021-05-27 20:47:46 -04:00
parent 669037277b
commit 32e21333dd
4 changed files with 12 additions and 15 deletions

View File

@@ -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>`)