From 3818cf4004c13d63a609139f5c122a691f28bedb Mon Sep 17 00:00:00 2001 From: Toni Kangas Date: Wed, 13 Nov 2024 00:51:19 +0200 Subject: [PATCH] Fix test issues --- src/stores.ts | 2 +- src/views/Pileon/DeadEndModal.svelte | 18 ++++++++++-------- src/views/Pileon/Pileon.svelte | 2 +- test/views/Pileon.test.ts | 14 +++++++++++++- vitest.config.ts | 9 ++++++++- 5 files changed, 33 insertions(+), 12 deletions(-) diff --git a/src/stores.ts b/src/stores.ts index ea1b1b0..2ee386e 100644 --- a/src/stores.ts +++ b/src/stores.ts @@ -15,7 +15,7 @@ const defaultSettings: ISettings = { }; const userSettings = JSON.parse( - localStorage.getItem(settingsKey) ?? '', + localStorage.getItem(settingsKey) ?? 'null', ) as ISettings | null; export const settings = writable(userSettings ?? defaultSettings); diff --git a/src/views/Pileon/DeadEndModal.svelte b/src/views/Pileon/DeadEndModal.svelte index 1154a27..492b37a 100644 --- a/src/views/Pileon/DeadEndModal.svelte +++ b/src/views/Pileon/DeadEndModal.svelte @@ -1,17 +1,19 @@ {#if deadEnd} @@ -29,9 +31,9 @@ dispatch("shuffle")} + onClick={shuffle} /> - dispatch("undo")} /> + {/if} diff --git a/src/views/Pileon/Pileon.svelte b/src/views/Pileon/Pileon.svelte index 7bc8432..fc25f13 100644 --- a/src/views/Pileon/Pileon.svelte +++ b/src/views/Pileon/Pileon.svelte @@ -197,7 +197,7 @@ /> {/if} - +