(options: UserFactoryOptions = {})
| 21 | * ``` |
| 22 | */ |
| 23 | export function createUser(options: UserFactoryOptions = {}): User { |
| 24 | const id = options.id ?? `user-${generateRandomString(8)}` |
| 25 | return { |
| 26 | id, |
| 27 | email: options.email ?? `${id}@test.example.com`, |
| 28 | name: options.name ?? `Test User ${id.substring(0, 4)}`, |
| 29 | image: options.image, |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Options for creating a mock workspace. |
no test coverage detected