test: fix resolveDyanmicComponent test
This commit is contained in:
parent
08a3d95e52
commit
16ea2993d6
@ -6,7 +6,8 @@ import {
|
||||
resolveDirective,
|
||||
Component,
|
||||
Directive,
|
||||
resolveDynamicComponent
|
||||
resolveDynamicComponent,
|
||||
getCurrentInstance
|
||||
} from '@vue/runtime-test'
|
||||
|
||||
describe('resolveAssets', () => {
|
||||
@ -103,10 +104,11 @@ describe('resolveAssets', () => {
|
||||
const Root = {
|
||||
components: { foo: dynamicComponents.foo },
|
||||
setup() {
|
||||
const instance = getCurrentInstance()!
|
||||
return () => {
|
||||
foo = resolveDynamicComponent('foo') // <component is="foo"/>
|
||||
bar = resolveDynamicComponent(dynamicComponents.bar) // <component :is="bar"/>, function
|
||||
baz = resolveDynamicComponent(dynamicComponents.baz) // <component :is="baz"/>, object
|
||||
foo = resolveDynamicComponent('foo', instance) // <component is="foo"/>
|
||||
bar = resolveDynamicComponent(dynamicComponents.bar, instance) // <component :is="bar"/>, function
|
||||
baz = resolveDynamicComponent(dynamicComponents.baz, instance) // <component :is="baz"/>, object
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user