mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-17 03:01:25 +00:00
test(local-storage): add unit tests
This commit is contained in:
parent
7c853ec089
commit
5df515a052
7 changed files with 274 additions and 22 deletions
18
tests/LocalStorage/LocalStoragePrimitive.test.svelte
Normal file
18
tests/LocalStorage/LocalStoragePrimitive.test.svelte
Normal file
|
@ -0,0 +1,18 @@
|
|||
<script lang="ts">
|
||||
import { LocalStorage } from "carbon-components-svelte";
|
||||
|
||||
const primitiveValue = "test-value";
|
||||
</script>
|
||||
|
||||
<div data-testid="primitive-storage">
|
||||
<LocalStorage
|
||||
key="test-key"
|
||||
value={primitiveValue}
|
||||
on:save={() => {
|
||||
console.log("save event");
|
||||
}}
|
||||
on:update={({ detail }) => {
|
||||
console.log("update event", detail);
|
||||
}}
|
||||
/>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue