MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / withEphemeralTestUser

Function withEphemeralTestUser

packages/db/src/schema.test.ts:109–130  ·  view source on GitHub ↗
(
  testFn: (params: { userId: string }) => Promise<void>
)

Source from the content-addressed store, hash-verified

107 base_sha: baseSha,
108 sidebar_position: 'a0',
109 })
110 .returning();
111 expect(child).toMatchObject({ parent_worktree_id: parentId });
112 await expect(
113 schemaTestDb.db.insert(schema.cloud_agent_worktrees).values({
114 worktree_id: `workspace_${crypto.randomUUID()}`,
115 kilo_user_id: userId,
116 parent_worktree_id: `workspace_${crypto.randomUUID()}`,
117 })
118 ).rejects.toMatchObject({ cause: { code: '23503' } });
119
120 await schemaTestDb.db
121 .delete(schema.cloud_agent_worktrees)
122 .where(eq(schema.cloud_agent_worktrees.worktree_id, parentId));
123 const children = await schemaTestDb.db
124 .select()
125 .from(schema.cloud_agent_worktrees)
126 .where(eq(schema.cloud_agent_worktrees.worktree_id, childId));
127 expect(children).toEqual([
128 expect.objectContaining({
129 parent_worktree_id: null,
130 base_branch: 'feature/parent',
131 base_sha: baseSha,
132 sidebar_position: 'a0',
133 }),

Callers 1

schema.test.tsFile · 0.85

Calls 2

valuesMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected