test(loading): add unit tests

This commit is contained in:
Eric Liu 2025-03-16 12:09:38 -07:00
commit 8be87921f0
3 changed files with 121 additions and 7 deletions

View file

@ -0,0 +1,28 @@
<script lang="ts">
import { Loading } from "carbon-components-svelte";
</script>
<!-- Default loading (with overlay) -->
<div data-testid="default-loader">
<Loading />
</div>
<!-- Loading without overlay -->
<div data-testid="loader-no-overlay">
<Loading withOverlay={false} />
</div>
<!-- Small loading -->
<div data-testid="loader-small">
<Loading withOverlay={false} small />
</div>
<!-- Inactive loading -->
<div data-testid="loader-inactive">
<Loading active={false} />
</div>
<!-- Custom description -->
<div data-testid="loader-description">
<Loading description="Processing data..." />
</div>