refactor(createComponent): rename to defineComponent (#549)

This commit is contained in:
Chris Fritz
2019-12-22 10:58:12 -05:00
committed by Evan You
parent 7d2ae08277
commit 1c4cdd841d
18 changed files with 74 additions and 74 deletions

View File

@@ -7,7 +7,7 @@ import {
serializeInner,
nextTick,
watch,
createComponent,
defineComponent,
triggerEvent,
TestElement
} from '@vue/runtime-test'
@@ -16,7 +16,7 @@ import {
describe('api: setup context', () => {
it('should expose return values to template render context', () => {
const Comp = createComponent({
const Comp = defineComponent({
setup() {
return {
// ref should auto-unwrap
@@ -53,7 +53,7 @@ describe('api: setup context', () => {
render: () => h(Child, { count: count.value })
}
const Child = createComponent({
const Child = defineComponent({
setup(props: { count: number }) {
watch(() => {
dummy = props.count
@@ -82,7 +82,7 @@ describe('api: setup context', () => {
render: () => h(Child, { count: count.value })
}
const Child = createComponent({
const Child = defineComponent({
props: {
count: Number
},
@@ -177,7 +177,7 @@ describe('api: setup context', () => {
})
}
const Child = createComponent({
const Child = defineComponent({
props: {
count: {
type: Number,