12 questions
0
votes
0
answers
69
views
Issue: slots Field in Typings for Svelte Component Testing
I am building a Svelte component library for my project and have run into several issues, particularly when trying to test components with slots. Here's the error I'm facing:
Object literal may only ...
1
vote
0
answers
341
views
$state is not defined when testing Svelte component
I am trying to test a simple Svelte component using Jest and @testing-library/svelte, but I am encountering the following error:
Error
ReferenceError: $state is not defined
3 |
4 | it('...
0
votes
1
answer
196
views
Astro fails with svelte-testing-library
I'm building a website using Astro and a Svelte integration. For testing I added svelte-testing-library which runs fine when being executed with npm test.
Unfortunately after adding the component ...
2
votes
2
answers
2k
views
How to test Svelte component props with Vitest?
I want to test the props of a Svelte component with Vitest.
Component:
<script>
export let foo
</script>
<div>{foo}</div>
Test:
const { component } = render(MyComponent, { ...
0
votes
1
answer
920
views
Difference between fireEvent.dblClick & fireEvent.doubleClick in testing library?
Question about 2 different methods exposed via fireEvent API in the react-testing-library.
fireEvent.dblClick
fireEvent.doubleClick
What's the difference? And is there a recommendation to use one ...
4
votes
1
answer
1k
views
Svelte testing library won't detect component updates
My component:
<script lang="ts">
import { Button } from 'carbon-components-svelte';
import firebase from 'firebase/app';
import { auth } from '../../firebase-shortcut';
import ...