test: make tests less fragile

This commit is contained in:
2026-02-09 09:57:39 +05:00
parent 2bbe59107c
commit c4103e937d
12 changed files with 49 additions and 55 deletions
@@ -1,11 +1,11 @@
import { render } from "@testing-library/svelte";
import { render, screen } from "@testing-library/svelte";
import { describe, expect, it } from "vitest";
import SettingsRowTest from "./SettingsRowTest.svelte";
describe("SettingsRow.svelte", () => {
it("should render without crashing", () => {
render(SettingsRowTest);
const settingRow = document.querySelector(".setting-row");
expect(settingRow).toBeInTheDocument();
expect(screen.getByText("Test Label")).toBeInTheDocument();
expect(screen.getByTestId("test-input")).toBeInTheDocument();
});
});