mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 02:26:12 +02:00
test(server): isolate invite rate limit route
Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 file changed
+9
@@ -3,6 +3,15 @@ import request from "supertest";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { createInviteRateLimiter } from "../services/invite-rate-limit.js";
|
||||
|
||||
vi.mock("../services/index.js", () => ({
|
||||
accessService: vi.fn(() => ({})),
|
||||
agentService: vi.fn(() => ({})),
|
||||
boardAuthService: vi.fn(() => ({})),
|
||||
deduplicateAgentName: vi.fn((name: string) => name),
|
||||
logActivity: vi.fn().mockResolvedValue(undefined),
|
||||
notifyHireApproved: vi.fn().mockResolvedValue(undefined),
|
||||
}));
|
||||
|
||||
function createSelectChain(rows: unknown[]) {
|
||||
const query = {
|
||||
then(resolve: (value: unknown[]) => unknown) {
|
||||
|
||||
Reference in new issue
Block a user