mirror of https://github.com/vuejs/core.git
[autofix.ci] apply automated fixes
This commit is contained in:
parent
e0aac99102
commit
3072ade092
|
@ -1,9 +1,9 @@
|
||||||
import {
|
import {
|
||||||
ComponentInternalInstance,
|
type ComponentInternalInstance,
|
||||||
isStatefulComponent,
|
|
||||||
type ComponentOptions,
|
type ComponentOptions,
|
||||||
type FunctionalComponent,
|
type FunctionalComponent,
|
||||||
getCurrentInstance,
|
getCurrentInstance,
|
||||||
|
isStatefulComponent,
|
||||||
} from '../component'
|
} from '../component'
|
||||||
import { resolveInjections } from '../componentOptions'
|
import { resolveInjections } from '../componentOptions'
|
||||||
import type { InternalSlots } from '../componentSlots'
|
import type { InternalSlots } from '../componentSlots'
|
||||||
|
|
|
@ -71,26 +71,26 @@ describe('COMPONENT_FUNCTIONAL', () => {
|
||||||
render(h: any, ctx: any) {
|
render(h: any, ctx: any) {
|
||||||
parents.push(ctx.parent)
|
parents.push(ctx.parent)
|
||||||
return h('div', 'OK')
|
return h('div', 'OK')
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const FunctionalWrapper = {
|
const FunctionalWrapper = {
|
||||||
functional: true,
|
functional: true,
|
||||||
render(h: any) {
|
render(h: any) {
|
||||||
return h(ParentReporter)
|
return h(ParentReporter)
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const NonFunctionalRoot = {
|
const NonFunctionalRoot = {
|
||||||
render(h: any) {
|
render(h: any) {
|
||||||
return h('div', [h(ParentReporter), h(FunctionalWrapper)])
|
return h('div', [h(ParentReporter), h(FunctionalWrapper)])
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleDeprecationWarning(false)
|
toggleDeprecationWarning(false)
|
||||||
const vm = new Vue(NonFunctionalRoot).$mount()
|
const vm = new Vue(NonFunctionalRoot).$mount()
|
||||||
expect(vm.$el.outerHTML).toMatchInlineSnapshot(
|
expect(vm.$el.outerHTML).toMatchInlineSnapshot(
|
||||||
`"<div><div>OK</div><div>OK</div></div>"`
|
`"<div><div>OK</div><div>OK</div></div>"`,
|
||||||
)
|
)
|
||||||
expect(parents.length).toBe(2)
|
expect(parents.length).toBe(2)
|
||||||
// consistent with 2.x
|
// consistent with 2.x
|
||||||
|
|
Loading…
Reference in New Issue