(options: WorkspaceFactoryOptions = {})
| 50 | * ``` |
| 51 | */ |
| 52 | export function createWorkspace(options: WorkspaceFactoryOptions = {}): Workspace { |
| 53 | const now = new Date() |
| 54 | return { |
| 55 | id: options.id ?? `ws-${generateRandomString(8)}`, |
| 56 | name: options.name ?? 'Test Workspace', |
| 57 | ownerId: options.ownerId ?? `user-${generateRandomString(8)}`, |
| 58 | createdAt: options.createdAt ?? now, |
| 59 | updatedAt: options.updatedAt ?? now, |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | /** |
| 64 | * Options for creating a mock workflow. |
no test coverage detected