Skip to content

Commit

Permalink
Add failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gryphonmyers committed Jan 14, 2021
1 parent 3ea85c1 commit 3aa6af4
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions packages/server-renderer/__tests__/render.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,44 @@ function testRender(type: string, render: typeof renderToString) {
).toBe(`<div>hello</div>`)
})

test('components using defineComponent with extends option', async () => {
expect(
await render(
createApp(
defineComponent({
extends: {
data() {
return { msg: 'hello' }
},
render(this: any) {
return h('div', this.msg)
}
}
})
)
)
).toBe(`<div>hello</div>`)
})

test('components using defineComponent with mixins option', async () => {
expect(
await render(
createApp(
defineComponent({
mixins: [{
data() {
return { msg: 'hello' }
},
render(this: any) {
return h('div', this.msg)
}
}]
})
)
)
).toBe(`<div>hello</div>`)
})

test('optimized components', async () => {
expect(
await render(
Expand Down

0 comments on commit 3aa6af4

Please sign in to comment.