Skip to content

Commit

Permalink
test: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Jul 12, 2022
1 parent 78a36f6 commit c2d4221
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/runtime-core/__tests__/apiOptions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
createApp,
computed
} from '@vue/runtime-test'
import { render as domRender } from 'vue'

describe('api: options', () => {
test('data', async () => {
Expand Down Expand Up @@ -1035,6 +1036,19 @@ describe('api: options', () => {
expect(renderToString(h(Comp))).toBe('base,base')
})

test('extends template', () => {
const Comp = {
extends: {
template: `<h1>Foo</h1>`
}
}

const root = document.createElement('div') as any
domRender(h(Comp), root)
expect(root.innerHTML).toBe(`<h1>Foo</h1>`)
})


test('options defined in component have higher priority', async () => {
const Mixin = {
msg1: 'base'
Expand Down

0 comments on commit c2d4221

Please sign in to comment.