(overrides: Partial<IUser> = {})
| 17 | let __counter = 0; |
| 18 | |
| 19 | export 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 |
no test coverage detected