mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
test(local-storage): add unit tests
This commit is contained in:
parent
f23e7282b5
commit
f28bfe307e
7 changed files with 274 additions and 22 deletions
15
tests/LocalStorage/LocalStorageObject.test.svelte
Normal file
15
tests/LocalStorage/LocalStorageObject.test.svelte
Normal file
|
@ -0,0 +1,15 @@
|
|||
<script lang="ts">
|
||||
import { LocalStorage } from "carbon-components-svelte";
|
||||
|
||||
const objectValue = { theme: "dark", fontSize: 16 };
|
||||
</script>
|
||||
|
||||
<div data-testid="object-storage">
|
||||
<LocalStorage
|
||||
key="theme-settings"
|
||||
value={objectValue}
|
||||
on:update={({ detail }) => {
|
||||
console.log("update event", detail);
|
||||
}}
|
||||
/>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue