(options: WorkflowObjectFactoryOptions = {})
| 82 | * ``` |
| 83 | */ |
| 84 | export function createWorkflow(options: WorkflowObjectFactoryOptions = {}): Workflow { |
| 85 | const now = new Date() |
| 86 | return { |
| 87 | id: options.id ?? `wf-${generateRandomString(8)}`, |
| 88 | name: options.name ?? 'Test Workflow', |
| 89 | workspaceId: options.workspaceId ?? `ws-${generateRandomString(8)}`, |
| 90 | state: options.state ?? createWorkflowState(), |
| 91 | createdAt: options.createdAt ?? now, |
| 92 | updatedAt: options.updatedAt ?? now, |
| 93 | isDeployed: options.isDeployed ?? false, |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | /** |
| 98 | * Creates a user with an associated workspace. |
no test coverage detected