MCPcopy
hub / github.com/coder/mux / createScript

Function createScript

src/node/services/workflows/WorkflowService.test.ts:15–28  ·  view source on GitHub ↗
(
  source: string,
  overrides: Partial<ResolvedWorkflowScript> = {}
)

Source from the content-addressed store, hash-verified

13import type { ResolvedWorkflowScript } from "./workflowScriptResolver";
14
15function createScript(
16 source: string,
17 overrides: Partial<ResolvedWorkflowScript> = {}
18): ResolvedWorkflowScript {
19 return {
20 requestedScriptPath: "./workflows/demo.js",
21 canonicalScriptPath: "./workflows/demo.js",
22 source,
23 sourceHash: "sha256:test",
24 sourceKind: "workspace-file",
25 resolvedPath: "/workspace/workflows/demo.js",
26 ...overrides,
27 };
28}
29
30describe("WorkflowService", () => {
31 test("starts an explicit script workflow and persists the resolved source snapshot", async () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected