(status: RunResponse['status'])
| 52 | } |
| 53 | |
| 54 | function makeRun(status: RunResponse['status']): RunResponse { |
| 55 | return { |
| 56 | runId: 'run_abc', |
| 57 | testId: 'test_xyz', |
| 58 | projectId: 'project_1', |
| 59 | userId: 'user_1', |
| 60 | status, |
| 61 | source: 'cli', |
| 62 | createdAt: '2026-05-15T10:00:00.000Z', |
| 63 | startedAt: status !== 'queued' ? '2026-05-15T10:00:01.000Z' : null, |
| 64 | finishedAt: status !== 'queued' && status !== 'running' ? '2026-05-15T10:00:30.000Z' : null, |
| 65 | codeVersion: 'v1', |
| 66 | targetUrl: 'https://example.com', |
| 67 | createdFrom: 'cli', |
| 68 | failedStepIndex: null, |
| 69 | failureKind: null, |
| 70 | error: null, |
| 71 | videoUrl: null, |
| 72 | stepSummary: { total: 5, completed: 5, passedCount: 5, failedCount: 0 }, |
| 73 | }; |
| 74 | } |
| 75 | |
| 76 | function errorBody(code: string, details: Record<string, unknown> = {}) { |
| 77 | const statusMap: Record<string, number> = { |
no outgoing calls
no test coverage detected