const { slots } = parseWithSlots(`<Comp><slot v-for="a in b"/></Comp>`)
expect(slots).toMatchObject(toMatch)
})
+
+ test('<slot> tag w/ template', () => {
+ const { slots } = parseWithSlots(
+ `<Comp><template #default><slot/></template></Comp>`
+ )
+ expect(slots).toMatchObject(toMatch)
+ })
})
describe('errors', () => {
case NodeTypes.ELEMENT:
if (
child.tagType === ElementTypes.SLOT ||
- (child.tagType === ElementTypes.ELEMENT &&
+ ((child.tagType === ElementTypes.ELEMENT ||
+ child.tagType === ElementTypes.TEMPLATE) &&
hasForwardedSlots(child.children))
) {
return true