MCPcopy
hub / github.com/vuejs/core / renderWithSlots

Function renderWithSlots

packages/runtime-core/__tests__/componentSlots.spec.ts:16–27  ·  view source on GitHub ↗
(slots: any)

Source from the content-addressed store, hash-verified

14
15describe('component: slots', () => {
16 function renderWithSlots(slots: any): any {
17 let instance: any
18 const Comp = {
19 render() {
20 instance = getCurrentInstance()
21 return h('div')
22 },
23 }
24
25 render(h(Comp, null, slots), nodeOps.createElement('div'))
26 return instance
27 }
28
29 test('initSlots: instance.slots should be set correctly', () => {
30 let instance: any

Callers 1

Calls 3

renderFunction · 0.90
hFunction · 0.85
createElementMethod · 0.80

Tested by

no test coverage detected