(
ref: string,
context: WorkflowSchedulerRunContext,
)
| 81 | let mergeTriggeredBy: string | undefined; |
| 82 | |
| 83 | const run = async ( |
| 84 | ref: string, |
| 85 | context: WorkflowSchedulerRunContext, |
| 86 | ): Promise<{ activePorts?: string[] | undefined } | null> => { |
| 87 | order.push(ref); |
| 88 | if (ref === 'branchFail') { |
| 89 | await new Promise((resolve) => setTimeout(resolve, 5)); |
| 90 | throw new Error('branch failed'); |
| 91 | } |
| 92 | |
| 93 | if (ref === 'branchSuccess') { |
| 94 | await new Promise((resolve) => setTimeout(resolve, 15)); |
| 95 | } |
| 96 | |
| 97 | if (ref === 'merge') { |
| 98 | mergeTriggeredBy = context.triggeredBy; |
| 99 | } |
| 100 | |
| 101 | return null; |
| 102 | }; |
| 103 | |
| 104 | await expect( |
| 105 | runWorkflowWithScheduler(definition, { |
no test coverage detected