lint: fix biome issues in new test files and helpers
CI / check (push) Failing after 34s
CI / preflight (push) Skipped
CI / deploy (push) Skipped

This commit is contained in:
openhands committed 2026-09-21 18:19:39 +02:00
1 parent 99eb3af17b
commit 93862c2275
41 files changed
+488 -314

No files matched your search

+13 -8
View File
@@ -20,7 +20,10 @@ const actionErrorClass = vi.hoisted(
);
vi.mock("@/lib/safe-action", () => ({
adminAction: (opts: { permission?: string | readonly string[]; schema?: z.ZodType }, handler: (ctx: any) => unknown) => {
adminAction: (
opts: { permission?: string | readonly string[]; schema?: z.ZodType },
handler: (ctx: any) => unknown,
) => {
return async (input: unknown) => {
const needed = Array.isArray(opts.permission)
? opts.permission
@@ -140,12 +143,14 @@ describe("createTemplate", () => {
});
it("rejects empty titles and content", async () => {
expect(
await createTemplate({ title: "", content: "x" }),
).toMatchObject({ ok: false, error: "Validation failed" });
expect(
await createTemplate({ title: "T", content: "" }),
).toMatchObject({ ok: false, error: "Validation failed" });
expect(await createTemplate({ title: "", content: "x" })).toMatchObject({
ok: false,
error: "Validation failed",
});
expect(await createTemplate({ title: "T", content: "" })).toMatchObject({
ok: false,
error: "Validation failed",
});
});
it("requires the tickets edit permission", async () => {
@@ -203,4 +208,4 @@ describe("deleteTemplate", () => {
error: "Unauthorized",
});
});
});
});