MCPcopy Index your code
hub / github.com/coder/mux / createStore

Function createStore

src/node/services/workflows/WorkflowRunStore.test.ts:18–29  ·  view source on GitHub ↗
(sessionDir: string, staleLeaseMs = 10)

Source from the content-addressed store, hash-verified

16const source = "export default async function workflow() { return 'ok'; }\n";
17
18async function createStore(sessionDir: string, staleLeaseMs = 10) {
19 const store = new WorkflowRunStore({ sessionDir, staleLeaseMs });
20 await store.createRun({
21 id: "wfr_123",
22 workspaceId: "workspace-1",
23 workflow: definition,
24 source: source,
25 args: { topic: "durable runs" },
26 now: "2026-05-29T00:00:00.000Z",
27 });
28 return store;
29}
30
31describe("WorkflowRunStore", () => {
32 test("persists captured workflow source and reloads run state", async () => {

Callers 1

Calls 1

createRunMethod · 0.95

Tested by

no test coverage detected