style: add eslint and prettier, fix style errors

This commit is contained in:
2026-02-13 09:59:19 +05:00
parent 5d6159fe29
commit 387c1751c6
101 changed files with 14596 additions and 12946 deletions
+39 -39
View File
@@ -1,39 +1,39 @@
import { themeState } from "$states/theme.svelte";
import { render, screen } from "@testing-library/svelte";
import { beforeEach, describe, expect, it, vi } from "vitest";
import LayoutTest from "./LayoutTest.svelte";
describe("+layout.svelte", () => {
beforeEach(() => {
themeState.current = "dark";
vi.clearAllMocks();
});
it("should apply dark theme", () => {
themeState.current = "dark";
expect(themeState.current).toBe("dark");
});
it("should apply light theme", () => {
themeState.current = "light";
expect(themeState.current).toBe("light");
});
it("should toggle theme", () => {
themeState.current = "dark";
themeState.toggle();
expect(themeState.current).toBe("light");
});
});
describe("Layout Component Coverage", () => {
it("should render children snippet and initialize props", () => {
render(LayoutTest);
expect(screen.getByTestId("test-child")).toBeInTheDocument();
expect(screen.getByRole("banner")).toBeInTheDocument();
});
});
import { themeState } from "$states/theme.svelte";
import { render, screen } from "@testing-library/svelte";
import { beforeEach, describe, expect, it, vi } from "vitest";
import LayoutTest from "./LayoutTest.svelte";
describe("+layout.svelte", () => {
beforeEach(() => {
themeState.current = "dark";
vi.clearAllMocks();
});
it("should apply dark theme", () => {
themeState.current = "dark";
expect(themeState.current).toBe("dark");
});
it("should apply light theme", () => {
themeState.current = "light";
expect(themeState.current).toBe("light");
});
it("should toggle theme", () => {
themeState.current = "dark";
themeState.toggle();
expect(themeState.current).toBe("light");
});
});
describe("Layout Component Coverage", () => {
it("should render children snippet and initialize props", () => {
render(LayoutTest);
expect(screen.getByTestId("test-child")).toBeInTheDocument();
expect(screen.getByRole("banner")).toBeInTheDocument();
});
});