Function
bashTask
(
taskId: string,
status: BackgroundTaskInfo['status'],
endedAt: number | null = null,
)
Source from the content-addressed store, hash-verified
| 75 | } |
| 76 | |
| 77 | function bashTask( |
| 78 | taskId: string, |
| 79 | status: BackgroundTaskInfo['status'], |
| 80 | endedAt: number | null = null, |
| 81 | ): BackgroundTaskInfo { |
| 82 | return { |
| 83 | taskId, |
| 84 | kind: 'process', |
| 85 | description: 'pnpm install', |
| 86 | status, |
| 87 | startedAt: 1_000_000, |
| 88 | endedAt, |
| 89 | command: 'pnpm install', |
| 90 | pid: 1234, |
| 91 | exitCode: status === 'completed' ? 0 : null, |
| 92 | }; |
| 93 | } |
| 94 | |
| 95 | function fresh(): FakeState { |
| 96 | return { sessions: [], tasksBySession: new Map(), outputByTaskId: new Map(), stopCalls: [] }; |
Tested by
no test coverage detected