Function
recordStep
(
context: WebSmokeContext,
step: string,
args: string[],
result: CliJsonResult,
)
Source from the content-addressed store, hash-verified
| 242 | } |
| 243 | |
| 244 | function recordStep( |
| 245 | context: WebSmokeContext, |
| 246 | step: string, |
| 247 | args: string[], |
| 248 | result: CliJsonResult, |
| 249 | ): void { |
| 250 | const errorCode = |
| 251 | typeof result.json?.error?.code === 'string' ? result.json.error.code : undefined; |
| 252 | const errorMessage = |
| 253 | typeof result.json?.error?.message === 'string' ? result.json.error.message : undefined; |
| 254 | context.stepHistory.push({ |
| 255 | step, |
| 256 | command: `agent-device ${args.join(' ')}`, |
| 257 | status: result.status, |
| 258 | timestamp: new Date().toISOString(), |
| 259 | errorCode, |
| 260 | errorMessage, |
| 261 | }); |
| 262 | } |
| 263 | |
| 264 | function maybeCaptureSnapshot( |
| 265 | context: WebSmokeContext, |
Tested by
no test coverage detected