render() {
return state.ok
? [h('div', 'one'), 'two']
- : [h('div', 'foo'), 'bar', 'baz']
+ : [h('pre', 'foo'), 'bar', 'baz']
}
}
const root = nodeOps.createElement('div')
state.ok = false
await nextTick()
- expect(serialize(root)).toBe(`<div><div>foo</div>barbaz</div>`)
+ expect(serialize(root)).toBe(`<div><pre>foo</pre>barbaz</div>`)
})
it('should be able to patch fragment children (explcitly keyed)', async () => {
if (childFlags !== ChildrenFlags.NO_CHILDREN) {
const hasSVGChildren = isSVG && tag !== 'foreignObject'
if (childFlags & ChildrenFlags.SINGLE_VNODE) {
- mount(children as VNode, el, contextVNode, hasSVGChildren, endNode)
+ mount(children as VNode, el, contextVNode, hasSVGChildren, null)
} else if (childFlags & ChildrenFlags.MULTIPLE_VNODES) {
mountArrayChildren(
children as VNode[],
el,
contextVNode,
hasSVGChildren,
- endNode
+ null
)
}
}