Skip to content

Commit 74829ca

Browse files
committed
test: add non-inline
1 parent 21ee3f4 commit 74829ca

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/compiler-core/__tests__/transforms/transformElement.spec.ts

+11
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,17 @@ describe('compiler: element transform', () => {
163163
expect(node.tag).toBe(`_unref(props["Foo"]).Example`)
164164
})
165165

166+
test('resolve namespaced component from props bindings (non-inline)', () => {
167+
const { root, node } = parseWithElementTransform(`<Foo.Example/>`, {
168+
inline: false,
169+
bindingMetadata: {
170+
Foo: BindingTypes.PROPS
171+
}
172+
})
173+
expect(root.helpers).not.toContain(RESOLVE_COMPONENT)
174+
expect(node.tag).toBe('$props["Foo"].Example')
175+
})
176+
166177
test('do not resolve component from non-script-setup bindings', () => {
167178
const bindingMetadata = {
168179
Example: BindingTypes.SETUP_MAYBE_REF

0 commit comments

Comments
 (0)