( blocks: Record<string, BlockState> )
| 173 | * Returns the first validation error found, or success if all are valid |
| 174 | */ |
| 175 | export function validateWorkflowSchedules( |
| 176 | blocks: Record<string, BlockState> |
| 177 | ): ScheduleValidationResult { |
| 178 | const scheduleBlocks = findScheduleBlocks(blocks) |
| 179 | |
| 180 | for (const block of scheduleBlocks) { |
| 181 | const result = validateScheduleBlock(block) |
| 182 | if (!result.isValid) { |
| 183 | return result |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | return { isValid: true } |
| 188 | } |
no test coverage detected