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 -4
View File
@@ -3,14 +3,19 @@ import {
createMockAuth,
createMockDb,
createMockLogStaffActivity,
createMockRevalidatePath,
createMockRcon,
createMockRevalidatePath,
} from "./test-helpers";
describe("test-helpers", () => {
it("createMockDb returns vi.fn-backed query methods", () => {
const db = createMockDb();
expect(Object.keys(db).sort()).toEqual(["delete", "insert", "select", "update"]);
expect(Object.keys(db).sort()).toEqual([
"delete",
"insert",
"select",
"update",
]);
for (const method of ["insert", "update", "delete", "select"]) {
expect(db[method as keyof typeof db]).toBeTypeOf("function");
expect(vi.isMockFunction(db[method as keyof typeof db])).toBe(true);
@@ -19,7 +24,11 @@ describe("test-helpers", () => {
it("createMockAuth returns next-auth-like object", () => {
const auth = createMockAuth();
expect(auth).toEqual({ auth: expect.any(Function), handlers: {}, signOut: expect.any(Function) });
expect(auth).toEqual({
auth: expect.any(Function),
handlers: {},
signOut: expect.any(Function),
});
expect(vi.isMockFunction(auth.auth)).toBe(true);
expect(vi.isMockFunction(auth.signOut)).toBe(true);
});
@@ -47,4 +56,4 @@ describe("test-helpers", () => {
const b = createMockRevalidatePath();
expect(a).not.toBe(b);
});
});
});