MCPcopy Create free account
hub / github.com/ShipSecAI/studio / run

Function run

worker/src/temporal/__tests__/workflow-scheduler.test.ts:83–102  ·  view source on GitHub ↗
(
      ref: string,
      context: WorkflowSchedulerRunContext,
    )

Source from the content-addressed store, hash-verified

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, {

Callers 1

runWorkflowWithSchedulerFunction · 0.85

Calls 2

pushMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected