Skip to content

Commit 9510748

Browse files
committed
chore: update
1 parent 5b76208 commit 9510748

File tree

1 file changed

+27
-29
lines changed

1 file changed

+27
-29
lines changed

packages/runtime-vapor/__tests__/componentSlots.spec.ts

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,44 +12,42 @@ import {
1212
import { makeRender } from './_utils'
1313

1414
const define = makeRender<any>()
15+
function renderWithSlots(slots: any): any {
16+
let instance: any
17+
const Comp = defineComponent({
18+
render() {
19+
const t0 = template('<div></div>')
20+
const n0 = t0()
21+
instance = getCurrentInstance()
22+
return n0
23+
},
24+
})
1525

16-
describe('component: slots', () => {
17-
function renderWithSlots(slots: any): any {
18-
let instance: any
19-
const Comp = defineComponent({
20-
vapor: true,
21-
render() {
22-
const t0 = template('<div></div>')
23-
const n0 = t0()
24-
instance = getCurrentInstance()
25-
return n0
26-
},
27-
})
28-
29-
const { render } = define({
30-
render() {
31-
return createComponent(Comp, {}, slots)
32-
},
33-
})
26+
const { render } = define({
27+
render() {
28+
return createComponent(Comp, {}, slots)
29+
},
30+
})
3431

35-
render()
36-
return instance
37-
}
32+
render()
33+
return instance
34+
}
3835

36+
describe('component: slots', () => {
3937
test('initSlots: instance.slots should be set correctly', () => {
4038
const { slots } = renderWithSlots({ _: 1 })
4139
expect(slots).toMatchObject({ _: 1 })
4240
})
4341

4442
// NOTE: slot normalization is not supported
45-
// test.todo(
46-
// 'initSlots: should normalize object slots (when value is null, string, array)',
47-
// () => {},
48-
// )
49-
// test.todo(
50-
// 'initSlots: should normalize object slots (when value is function)',
51-
// () => {},
52-
// )
43+
test.todo(
44+
'initSlots: should normalize object slots (when value is null, string, array)',
45+
() => {},
46+
)
47+
test.todo(
48+
'initSlots: should normalize object slots (when value is function)',
49+
() => {},
50+
)
5351

5452
test('initSlots: instance.slots should be set correctly', () => {
5553
let instance: any

0 commit comments

Comments
 (0)