test(utils): add test helper utilities for mocking
CI / check (push) Failing after 25s
CI / deploy (push) Skipped
CI / publish-container (push) Skipped

This commit is contained in:
openhands committed 2026-09-13 14:37:33 +02:00
1 parent 7a2c75701e
commit d78744efc1
1 file changed
+28
+28
View File
@@ -0,0 +1,28 @@
import { vi } from "vitest";
export const createMockDb = () => ({
insert: vi.fn(),
update: vi.fn(),
delete: vi.fn(),
select: vi.fn(),
});
export const createMockAuth = () => ({
auth: vi.fn(),
handlers: {},
signOut: vi.fn(),
});
export const createMockRcon = () => ({
disconnectUser: vi.fn(),
giveBadge: vi.fn(),
removeBadge: vi.fn(),
alertUser: vi.fn(),
muteUser: vi.fn(),
unmuteUser: vi.fn(),
giveCredits: vi.fn(),
});
export const createMockLogStaffActivity = () => vi.fn();
export const createMockRevalidatePath = () => vi.fn();