mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 10:51:06 +00:00
test(truncate): add unit tests
This commit is contained in:
parent
ca5f836c1c
commit
3cf1112e52
4 changed files with 123 additions and 22 deletions
11
tests/Truncate/Truncate.test.svelte
Normal file
11
tests/Truncate/Truncate.test.svelte
Normal file
|
@ -0,0 +1,11 @@
|
|||
<script lang="ts">
|
||||
import { Truncate } from "carbon-components-svelte";
|
||||
|
||||
export let clamp: "end" | "front" = "end";
|
||||
export let text =
|
||||
"This is a long text that should be truncated when it exceeds the available space";
|
||||
</script>
|
||||
|
||||
<Truncate {clamp}>
|
||||
{text}
|
||||
</Truncate>
|
Loading…
Add table
Add a link
Reference in a new issue