)
})
+ test('does not warn with multiple children in v-if branch', () => {
+ checkWarning(
+ `
+ <transition>
+ <h1 v-if="condition">
+ <span>True</span>
+ <span>True</span>
+ </h1>
+ <h1 v-else>False</h1>
+ </transition>
+ `,
+ false,
+ )
+ })
+
test('inject persisted when child has v-show', () => {
expect(
compileWithElementTransform(`
// not has v-for
!findDir(c, 'for') &&
// if the first child has v-if, the rest should also have v-else-if/v-else
- (index === 0 ? findDir(c, 'if') : hasElse(c)) &&
- !hasMultipleChildren(c),
+ (index === 0 ? findDir(c, 'if') : hasElse(c)),
)
) {
return false