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

Function makeUser

apps/api/tests/api/users/users.utils.test.ts:6–19  ·  view source on GitHub ↗
(overrides: Partial<IUser> = {})

Source from the content-addressed store, hash-verified

4import type { IUser } from "../../../src/api/users/users.types";
5
6const makeUser = (overrides: Partial<IUser> = {}): IUser => ({
7 id: "u-1",
8 email: "jane@example.com",
9 firstName: "Jane",
10 lastName: "Doe",
11 emailVerifiedAt: "2026-05-17T00:00:00.000Z",
12 isPlatformAdmin: false,
13 createdAt: "2026-01-01T00:00:00.000Z",
14 updatedAt: "2026-06-01T12:00:00.000Z",
15 mfaEnabledAt: null,
16 mfaSecretEncrypted: null,
17 mfaLastTotpStep: null,
18 ...overrides,
19});
20
21describe("toPublicUserProfile", () => {
22 test("maps all public profile fields from IUser", () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected