Open
Description
Struggling to test a async component. I created a suspense wrapper component with defineComponent
which i think should work but it doesn't:
it("renders a async component with a suspense wrapper", () => {
const Component = defineComponent({
async setup() {
return () => h("div", "AsyncSetup");
},
});
const { getByText } = render(
defineComponent({
render() {
return h(Suspense, null, {
default: h(Component),
fallback: h("div", "fallback"),
});
},
})
);
expect(getByText("AsyncSetup")).toBeInTheDocument(); // fails
});
Also created a repository for reproducing the issue.