(sessionDir: string, staleLeaseMs = 10)
| 16 | const source = "export default async function workflow() { return 'ok'; }\n"; |
| 17 | |
| 18 | async 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 | |
| 31 | describe("WorkflowRunStore", () => { |
| 32 | test("persists captured workflow source and reloads run state", async () => { |
no test coverage detected