"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/unit/features/component/component-scoped-slot.spec.js" between
vue-2.6.9.tar.gz and vue-2.6.10.tar.gz

About: Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

component-scoped-slot.spec.js  (vue-2.6.9):component-scoped-slot.spec.js  (vue-2.6.10)
skipping to change at line 1280 skipping to change at line 1280
const vm = new Vue({ const vm = new Vue({
template: `<test v-slot><template v-if="false">hi</template></test>`, template: `<test v-slot><template v-if="false">hi</template></test>`,
components: { components: {
Test: { Test: {
template: `<div><slot>fallback</slot></div>` template: `<div><slot>fallback</slot></div>`
} }
} }
}).$mount() }).$mount()
expect(vm.$el.textContent).toMatch('fallback') expect(vm.$el.textContent).toMatch('fallback')
}) })
// #9699
// Component only has normal slots, but is passing down $scopedSlots directly
// $scopedSlots should not be marked as stable in this case
it('render function passing $scopedSlots w/ normal slots down', done => {
const one = {
template: `<div><slot name="footer"/></div>`
}
const two = {
render(h) {
return h(one, {
scopedSlots: this.$scopedSlots
})
}
}
const vm = new Vue({
data: { count: 0 },
render(h) {
return h(two, [
h('span', { slot: 'footer' }, this.count)
])
}
}).$mount()
expect(vm.$el.textContent).toMatch(`0`)
vm.count++
waitForUpdate(() => {
expect(vm.$el.textContent).toMatch(`1`)
}).then(done)
})
}) })
 End of changes. 1 change blocks. 
0 lines changed or deleted 32 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)