Closed
Description
Version
1.0.0-beta.20
Reproduction link
https://codesandbox.io/s/wox3y9zljl
Steps to reproduce
- Look at the
src/TestComponent.spec.js
- Look at the Vue warn message in the Console tab
[Vue warn]: Error compiling template:
<div>Hello</div><div>World</div>
- Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.
- Look at the test tab and see that the 'mount with default slot' test fails.
What is expected?
That the test passes. The defined default slot contains a template string with two div elements next to each other and no single root element. In regular Vue templates there is no problem defining a default slot without a single root element when the slot content gets embedded inside another element.
What is actually happening?
The test fails and produces the mentioned template compile error.