-
In the Documentation, the Code for an async setup is the following:
That works perfectly. But what if, i want to set props of "Async"? I cant' set them via wrapper.vm.setProps and i cant set them in the mount(...) Function, because these are the props from TestComponent. I also tried to write it into the Template, as in usual Vue Templates - that results, that the Object is converted to a String... |
Beta Was this translation helpful? Give feedback.
Answered by
cexbrayat
Nov 17, 2022
Replies: 1 comment 2 replies
-
If I understand your question correctly, I would do something like that: test('Async component', () => {
const TestComponent = defineComponent({
components: { Async },
template: '<Async :something="something" />',
props: { something: Object }
})
const wrapper = mount(TestComponent, { props: { something: { hello: 'world' } })
}) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
BIGScream
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I understand your question correctly, I would do something like that: