Skip to content

Commit 0f8184f

Browse files
committed
wrap componentOptions on defineComponent
1 parent 8dcdb40 commit 0f8184f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

packages/server-renderer/__tests__/render.spec.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,14 @@ function testRender(type: string, render: typeof renderToString) {
128128
await render(
129129
createApp(
130130
defineComponent({
131-
extends: {
131+
extends: defineComponent({
132132
data() {
133133
return { msg: 'hello' }
134134
},
135135
render(this: any) {
136136
return h('div', this.msg)
137137
}
138-
}
138+
})
139139
})
140140
)
141141
)
@@ -148,14 +148,14 @@ function testRender(type: string, render: typeof renderToString) {
148148
createApp(
149149
defineComponent({
150150
mixins: [
151-
{
151+
defineComponent({
152152
data() {
153153
return { msg: 'hello' }
154154
},
155155
render(this: any) {
156156
return h('div', this.msg)
157157
}
158-
}
158+
})
159159
]
160160
})
161161
)
@@ -675,9 +675,7 @@ function testRender(type: string, render: typeof renderToString) {
675675
const MyComp = {
676676
render: () => h('p', 'hello')
677677
}
678-
expect(await render(h(KeepAlive, () => h(MyComp)))).toBe(
679-
`<p>hello</p>`
680-
)
678+
expect(await render(h(KeepAlive, () => h(MyComp)))).toBe(`<p>hello</p>`)
681679
})
682680

683681
test('Transition', async () => {

0 commit comments

Comments
 (0)