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

Function createTestUser

tests/integration/auth.test.ts:51–58  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

49type TestKey = { id: number; userId: number; key: string; canLoginWebUi: boolean };
50
51async function createTestUser(name: string): Promise<TestUser> {
52 const [row] = await db
53 .insert(users)
54 .values({ name })
55 .returning({ id: users.id, name: users.name });
56 if (!row) throw new Error("创建测试用户失败:未返回插入结果");
57 return row;
58}
59
60async function createTestKey(params: {
61 userId: number;

Callers 1

auth.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected