I am in the process of developing a website with Astro and integrating it with Svelte. To test my project, I have included svelte-testing-library, which works perfectly when executed using npm test
.
However, after adding the component tests, running astro check fails for all calls to render()
showing the following error:
No overload matches this call.
Overload 1 of 2, '(component: Constructor<SvelteComponent<any, any, any>>, componentOptions?: any, renderOptions?: Omit<RenderOptions<typeof import("/workspaces/workspace/node_modules/@testing-library/dom/types/queries")>, "queries"> | undefined): RenderResult<...>', gave the following error.
Overload 2 of 2, '(component: Constructor<SvelteComponent<any, any, any>>, componentOptions?: any, renderOptions?: RenderOptions<Queries> | undefined): RenderResult<...>', gave the following error.
11 render(Greeter, { name: "Luke Skywalker" });
~~~~~~~~~~~
I have created a Code Sandbox example showcasing the issue ler=a )n oorvy=dren(nrrof (%sepppiide.i eOTApo&ri/< T=>POAM>i Ta/R)t/>ob">'hilarsekrfoo';yiedytaMAR Scomponents/greeter.test.ts
.
Since npm test
completes without errors, I expected astro check
to do the same. Any suggestions on resolving this issue?