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 -3
View File
@@ -1,7 +1,11 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
const state = vi.hoisted(() => ({
requirePermission: vi.fn(async () => ({ id: 100, rank: 7, username: "staff" })),
requirePermission: vi.fn(async () => ({
id: 100,
rank: 7,
username: "staff",
})),
revalidatePath: vi.fn(),
del: vi.fn(async () => [{ affectedRows: 1 }]),
update: vi.fn(async () => [{ affectedRows: 1 }]),
@@ -82,8 +86,14 @@ describe("soundtrack actions", () => {
it("denies updates without the catalog edit permission", async () => {
state.requirePermission.mockRejectedValueOnce(new Error("forbidden"));
await expect(
updateSoundtrack({ id: 12, name: "x", author: "y", track: "z", length: 1 }),
updateSoundtrack({
id: 12,
name: "x",
author: "y",
track: "z",
length: 1,
}),
).rejects.toThrow("forbidden");
expect(state.update).not.toHaveBeenCalled();
});
});
});