Vue · Senior · Question 74 of 75
When does a component with an async setup() need special care in tests?
- ✓Correct answer: It must be wrapped in
<Suspense>(or awaited withflushPromises) before assertions, or it renders nothing - 2Never; it behaves like a sync component
- 3It can't be tested
Explanation
Test helpers often mount a wrapper with <Suspense> and then wait for promises to resolve.