chore: fix lint errors — auto-format, isNaN, unused imports, button type
Some checks failed
CI / ci (push) Failing after 1m41s
CI / e2e (push) Has been skipped
CI / deploy (push) Has been skipped

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-19 22:54:37 +02:00
parent 22f5004e53
commit e044547121
23 changed files with 259 additions and 106 deletions

View File

@@ -5,16 +5,11 @@ import {
deleteTag,
getAdminTags,
getAllTags,
getTagWithCounts,
updateTag,
} from "../../src/server/services/tag.service.ts";
import { createTestDb } from "../helpers/db.ts";
async function insertTag(
db: any,
name: string,
parentId?: number | null,
) {
async function insertTag(db: any, name: string, parentId?: number | null) {
const [row] = await db
.insert(tags)
.values({ name, parentId: parentId ?? null })
@@ -108,7 +103,10 @@ describe("createTag", () => {
it("creates a tag with parentId set to an existing tag id", async () => {
const parent = await createTag(db, { name: "gear" });
const child = await createTag(db, { name: "clothing", parentId: parent.id });
const child = await createTag(db, {
name: "clothing",
parentId: parent.id,
});
expect(child.parentId).toBe(parent.id);
});
});
@@ -175,7 +173,7 @@ describe("deleteTag", () => {
const parent = await insertTag(db, "parent");
const child = await insertTag(db, "child", parent.id);
await deleteTag(db, parent.id);
const [childRow] = await db
const [_childRow] = await db
.select({ parentId: tags.parentId })
.from(tags)
.where((t: any) => t.id === child.id);