( record: Record<string, unknown>, stepNumber: number, nestedCommands: readonly string[], )
| 139 | } |
| 140 | |
| 141 | function readBatchStepCommand( |
| 142 | record: Record<string, unknown>, |
| 143 | stepNumber: number, |
| 144 | nestedCommands: readonly string[], |
| 145 | ): string { |
| 146 | if (nestedCommands === STRUCTURED_BATCH_COMMAND_NAMES) { |
| 147 | return readStructuredBatchCommandName(record.command, stepNumber); |
| 148 | } |
| 149 | const command = record.command; |
| 150 | if (typeof command !== 'string' || !nestedCommands.includes(command)) { |
| 151 | throw new Error(`Expected command to be one of: ${nestedCommands.join(', ')}.`); |
| 152 | } |
| 153 | return command; |
| 154 | } |
| 155 | |
| 156 | function readBatchStepRuntimeProperty( |
| 157 | record: Record<string, unknown>, |
no test coverage detected
searching dependent graphs…