MCPcopy Create free account
hub / github.com/ding113/claude-code-hub / buildKey

Function buildKey

tests/unit/security/api-key-auth-cache.test.ts:71–95  ·  view source on GitHub ↗
(overrides?: Partial<Key>)

Source from the content-addressed store, hash-verified

69});
70
71function buildKey(overrides?: Partial<Key>): Key {
72 return {
73 id: 1,
74 userId: 10,
75 name: "k1",
76 key: "sk-test",
77 isEnabled: true,
78 expiresAt: undefined,
79 canLoginWebUi: true,
80 limit5hUsd: null,
81 limitDailyUsd: null,
82 dailyResetMode: "fixed",
83 dailyResetTime: "00:00",
84 limitWeeklyUsd: null,
85 limitMonthlyUsd: null,
86 limitTotalUsd: null,
87 limitConcurrentSessions: 0,
88 providerGroup: null,
89 cacheTtlPreference: null,
90 createdAt: new Date("2026-01-01T00:00:00.000Z"),
91 updatedAt: new Date("2026-01-02T00:00:00.000Z"),
92 deletedAt: undefined,
93 ...overrides,
94 };
95}
96
97function buildUser(overrides?: Partial<User>): User {
98 return {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected