mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-17 11:11:25 +00:00
test(search): add unit tests
This commit is contained in:
parent
942e6f670b
commit
e876553790
5 changed files with 130 additions and 21 deletions
22
tests/Search/SearchExpandable.test.svelte
Normal file
22
tests/Search/SearchExpandable.test.svelte
Normal file
|
@ -0,0 +1,22 @@
|
|||
<script lang="ts">
|
||||
import { Search } from "carbon-components-svelte";
|
||||
|
||||
let expanded = false;
|
||||
let value = "";
|
||||
</script>
|
||||
|
||||
<Search
|
||||
bind:expanded
|
||||
bind:value
|
||||
expandable
|
||||
labelText="Expandable search"
|
||||
placeholder="Search expandable..."
|
||||
on:expand={() => {
|
||||
console.log("expanded");
|
||||
}}
|
||||
on:collapse={() => {
|
||||
console.log("collapsed");
|
||||
}}
|
||||
/>
|
||||
|
||||
<div>Status: {expanded ? "expanded" : "collapsed"}</div>
|
Loading…
Add table
Add a link
Reference in a new issue