lint: fix biome issues in new test files and helpers
This commit is contained in:
1 parent
99eb3af17b
commit
93862c2275
41 files changed
+488
-314
No files matched your search
@@ -42,8 +42,8 @@ vi.mock("@/lib/services/staff-activity", () => ({
|
||||
logStaffActivity: mockLogStaffActivity,
|
||||
}));
|
||||
|
||||
import { savePoints } from "./admin-radio-points";
|
||||
import { WebsiteSetting } from "@/lib/db";
|
||||
import { savePoints } from "./admin-radio-points";
|
||||
|
||||
function form(data: Record<string, string>): FormData {
|
||||
const fd = new FormData();
|
||||
@@ -62,7 +62,7 @@ beforeEach(() => {
|
||||
});
|
||||
});
|
||||
|
||||
const POINTS_KEYS = [
|
||||
const _POINTS_KEYS = [
|
||||
"radio_points_enabled",
|
||||
"radio_points_per_minute",
|
||||
"radio_points_currency",
|
||||
@@ -165,7 +165,8 @@ describe("savePoints", () => {
|
||||
});
|
||||
|
||||
it("fails soft on DB errors but still revalidates and redirects", async () => {
|
||||
fakeDbConfig.fail = (kind: string) => (kind === "insert" ? "db down" : false);
|
||||
fakeDbConfig.fail = (kind: string) =>
|
||||
kind === "insert" ? "db down" : false;
|
||||
await savePoints(
|
||||
form({ radio_points_enabled: "on", radio_points_currency: "diamonds" }),
|
||||
);
|
||||
@@ -174,4 +175,4 @@ describe("savePoints", () => {
|
||||
expect(mockRevalidatePath).toHaveBeenCalledWith("/admin/radio/points");
|
||||
expect(mockRedirect).toHaveBeenCalledWith("/admin/radio/points?saved=1");
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user