mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-17 03:01:25 +00:00
test(theme): add unit tests
This commit is contained in:
parent
f28bfe307e
commit
150e03e1fd
7 changed files with 243 additions and 24 deletions
23
tests/Theme/Theme.test.svelte
Normal file
23
tests/Theme/Theme.test.svelte
Normal file
|
@ -0,0 +1,23 @@
|
|||
<svelte:options accessors />
|
||||
|
||||
<script lang="ts">
|
||||
import { Theme } from "carbon-components-svelte";
|
||||
import type { CarbonTheme } from "carbon-components-svelte/Theme/Theme.svelte";
|
||||
|
||||
export let theme: CarbonTheme = "white";
|
||||
export let persist = false;
|
||||
export let tokens = {};
|
||||
</script>
|
||||
|
||||
<div data-testid="theme-wrapper">
|
||||
<Theme
|
||||
{theme}
|
||||
{persist}
|
||||
{tokens}
|
||||
on:update={({ detail }) => {
|
||||
console.log("update", detail);
|
||||
}}
|
||||
>
|
||||
<slot />
|
||||
</Theme>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue