You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expect('Component template should contain exactly one root element:\n\n<div v-if="1"></div><div v-else></div><div></div>')
99
+
.toHaveBeenWarned()
100
+
})
101
+
102
+
it('warn 2 root elements with v-if and v-else with v-for on 2nd',()=>{
103
+
parse('<div v-if="1"></div><div v-else v-for="i in [1]"></div>',baseOptions)
104
+
expect('Cannot use v-for on stateful component root element because it renders multiple elements:\n<div v-if="1"></div><div v-else v-for="i in [1]"></div>')
105
+
.toHaveBeenWarned()
106
+
})
107
+
79
108
it('warn <template> as root element',()=>{
80
109
parse('<template></template>',baseOptions)
81
110
expect('Cannot use <template> as component root element').toHaveBeenWarned()
0 commit comments