( context: WebSmokeContext, step: string, args: string[], expected: Record<string, unknown>, )
| 193 | } |
| 194 | |
| 195 | async function assertCommandData( |
| 196 | context: WebSmokeContext, |
| 197 | step: string, |
| 198 | args: string[], |
| 199 | expected: Record<string, unknown>, |
| 200 | ): Promise<void> { |
| 201 | const fullArgs = [...args, ...context.common]; |
| 202 | const result = await runStep(context, step, fullArgs); |
| 203 | for (const [key, value] of Object.entries(expected)) { |
| 204 | if (result.json?.data?.[key] === value) continue; |
| 205 | failWithContext(context, step, fullArgs, result, `${key} !== ${JSON.stringify(value)}`); |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | async function runStep( |
| 210 | context: WebSmokeContext, |
no test coverage detected