test: fix tests and typescript typechecks

This commit is contained in:
2026-02-08 14:02:52 +05:00
parent 1b0675e4b2
commit 81771970c7
16 changed files with 56 additions and 293 deletions
@@ -25,6 +25,7 @@ describe("TextInput.svelte", () => {
});
const input = container.querySelector(".text-input");
if (!input) throw new Error("Input element not found");
await fireEvent.input(input, { target: { value: "Updated text" } });
expect(input).toHaveValue("Updated text");
@@ -40,6 +41,7 @@ describe("TextInput.svelte", () => {
});
const input = container.querySelector(".text-input");
if (!input) throw new Error("Input element not found");
await fireEvent.keyDown(input, { key: "Enter" });
expect(onenter).toHaveBeenCalledTimes(1);
@@ -55,6 +57,7 @@ describe("TextInput.svelte", () => {
});
const input = container.querySelector(".text-input");
if (!input) throw new Error("Input element not found");
await fireEvent.keyDown(input, { key: "Escape" });
await fireEvent.keyDown(input, { key: "Tab" });