MCPcopy
hub / github.com/simstudioai/sim / createUser

Function createUser

packages/testing/src/factories/user.factory.ts:23–31  ·  view source on GitHub ↗
(options: UserFactoryOptions = {})

Source from the content-addressed store, hash-verified

21 * ```
22 */
23export 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.

Callers 1

createUserWithWorkspaceFunction · 0.70

Calls 1

generateRandomStringFunction · 0.90

Tested by

no test coverage detected