Skip to content

How to test an async setups with props? #1876

Answered by cexbrayat
BIGScream asked this question in Q&A
Discussion options

You must be logged in to vote

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' } })
})

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@BIGScream
Comment options

@cexbrayat
Comment options

Answer selected by BIGScream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants