MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / makeUser

Function makeUser

apps/ui/tests/factories/user.factory.ts:19–33  ·  view source on GitHub ↗
(overrides: Partial<IUser> = {})

Source from the content-addressed store, hash-verified

17let __counter = 0;
18
19export function makeUser(overrides: Partial<IUser> = {}): IUser {
20 __counter += 1;
21 const suffix = __counter.toString(16).padStart(12, "0");
22
23 return {
24 id: `f47ac10b-58cc-4372-a567-${suffix}`,
25 email: "demo@example.com",
26 firstName: "Demo",
27 lastName: "User",
28 emailVerified: true,
29 createdAt: now(),
30 updatedAt: now(),
31 ...overrides
32 };
33}
34
35/**
36 * Reset the internal counter — useful in `beforeEach` if you depend on the

Calls 1

nowFunction · 0.90

Tested by

no test coverage detected