(overrides: Partial<Repo> = {})
| 195 | |
| 196 | // Helper to create a mock repo |
| 197 | const createMockRepo = (overrides: Partial<Repo> = {}): Repo => ({ |
| 198 | id: 1, |
| 199 | name: 'test-repo', |
| 200 | cloneUrl: 'https://github.com/test/repo.git', |
| 201 | orgId: 1, |
| 202 | indexedAt: null, |
| 203 | indexedCommitHash: null, |
| 204 | defaultBranch: 'main', |
| 205 | metadata: {}, |
| 206 | repoIndexingStatus: 'CREATED', |
| 207 | latestIndexingJobStatus: null, |
| 208 | latestConnectionSyncJobStatus: null, |
| 209 | external_id: 'test-external-id', |
| 210 | external_codeHostType: 'github', |
| 211 | external_codeHostUrl: 'https://github.com', |
| 212 | pushedAt: null, |
| 213 | createdAt: new Date(), |
| 214 | updatedAt: new Date(), |
| 215 | isFork: false, |
| 216 | isArchived: false, |
| 217 | isAutoCleanupDisabled: false, |
| 218 | ...overrides, |
| 219 | } as Repo); |
| 220 | |
| 221 | // Helper to create a mock repoWithConnections |
| 222 | const createMockRepoWithConnections = (overrides: Partial<RepoWithConnections> = {}): RepoWithConnections => ({ |
no outgoing calls
no test coverage detected