Skip to content

Commit

Permalink
test: add non-inline
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Aug 30, 2023
1 parent 21ee3f4 commit 74829ca
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,17 @@ describe('compiler: element transform', () => {
expect(node.tag).toBe(`_unref(props["Foo"]).Example`)
})

test('resolve namespaced component from props bindings (non-inline)', () => {
const { root, node } = parseWithElementTransform(`<Foo.Example/>`, {
inline: false,
bindingMetadata: {
Foo: BindingTypes.PROPS
}
})
expect(root.helpers).not.toContain(RESOLVE_COMPONENT)
expect(node.tag).toBe('$props["Foo"].Example')
})

test('do not resolve component from non-script-setup bindings', () => {
const bindingMetadata = {
Example: BindingTypes.SETUP_MAYBE_REF
Expand Down

0 comments on commit 74829ca

Please sign in to comment.