mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
test(checkbox): add unit tests
This commit is contained in:
parent
1ba777ade8
commit
ca4a12164d
6 changed files with 197 additions and 15 deletions
20
tests/Checkbox/Checkbox.test.svelte
Normal file
20
tests/Checkbox/Checkbox.test.svelte
Normal file
|
@ -0,0 +1,20 @@
|
|||
<script lang="ts">
|
||||
import { Checkbox } from "carbon-components-svelte";
|
||||
|
||||
export let checked = false;
|
||||
export let indeterminate = false;
|
||||
export let disabled = false;
|
||||
export let hideLabel = false;
|
||||
export let labelText = "Checkbox label";
|
||||
</script>
|
||||
|
||||
<Checkbox
|
||||
bind:checked
|
||||
bind:indeterminate
|
||||
{disabled}
|
||||
{hideLabel}
|
||||
{labelText}
|
||||
data-testid="checkbox"
|
||||
on:check={() => console.log("check")}
|
||||
on:click={() => console.log("click")}
|
||||
/>
|
Loading…
Add table
Add a link
Reference in a new issue