import Vue from 'vue'
describe('Options functional', () => {
it('should work', done => {
const vm = new Vue({
data: { test: 'foo' },
template: '
bar
',
components: {
wrap: {
functional: true,
props: ['msg'],
render (h, props, children) {
return h('div', null, [props.msg, ' '].concat(children))
}
}
}
}).$mount()
expect(vm.$el.innerHTML).toBe('foo bar
')
vm.test = 'qux'
waitForUpdate(() => {
expect(vm.$el.innerHTML).toBe('qux bar
')
}).then(done)
})
})