test(local-storage): add unit tests

This commit is contained in:
Eric Liu 2025-03-16 12:32:53 -07:00
commit f28bfe307e
7 changed files with 274 additions and 22 deletions

View 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>