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

Function createWorkspace

packages/testing/src/factories/user.factory.ts:52–61  ·  view source on GitHub ↗
(options: WorkspaceFactoryOptions = {})

Source from the content-addressed store, hash-verified

50 * ```
51 */
52export 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.

Callers 1

createUserWithWorkspaceFunction · 0.70

Calls 1

generateRandomStringFunction · 0.90

Tested by

no test coverage detected