mirror of https://github.com/vuejs/core.git
test(slots): ensure createSlots helper work with ssr slots (#6660)
This commit is contained in:
parent
8963c5508c
commit
3cc8e024e6
|
@ -26,6 +26,14 @@ describe('createSlot', () => {
|
||||||
expect(ret.key).toBe('1')
|
expect(ret.key).toBe('1')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('should check nullability', () => {
|
||||||
|
const slot = (() => {}) as Slot
|
||||||
|
const dynamicSlot = [{ name: 'descriptor', fn: slot, key: '1' }]
|
||||||
|
|
||||||
|
const actual = createSlots(record, dynamicSlot)
|
||||||
|
expect(actual).toHaveProperty('descriptor')
|
||||||
|
})
|
||||||
|
|
||||||
it('should add all slots to the record', () => {
|
it('should add all slots to the record', () => {
|
||||||
const dynamicSlot = [
|
const dynamicSlot = [
|
||||||
{ name: 'descriptor', fn: slot },
|
{ name: 'descriptor', fn: slot },
|
||||||
|
|
Loading…
Reference in New Issue