'
).toHaveBeenWarned()
})
// GitHub issue #6006
it('should work with dynamic name', done => {
const vm = new Vue({
template: `
`,
data: {
items: ['a', 'b', 'c'],
name: 'group'
}
}).$mount(el)
vm.name = 'invalid-name'
vm.items = ['b', 'c', 'a']
waitForUpdate(() => {
expect(vm.$el.innerHTML.replace(/\s?style=""(\s?)/g, '$1')).toBe(
`
` + `b
` + `c
` + `a
` + ``
)
vm.name = 'group'
vm.items = ['a', 'b', 'c']
})
.thenWaitFor(nextFrame)
.then(() => {
expect(vm.$el.innerHTML.replace(/\s?style=""(\s?)/g, '$1')).toBe(
`
` +
`a
` +
`b
` +
`c
` +
``
)
})
.thenWaitFor(duration * 2 + buffer)
.then(() => {
expect(vm.$el.innerHTML.replace(/\s?style=""(\s?)/g, '$1')).toBe(
`
` +
`a
` +
`b
` +
`c
` +
``
)
})
.then(done)
})
})