Some checks failed
CI / typecheck + lint + boundaries + test + build (push) Has been cancelled
CI / Playwright e2e (push) Has been cancelled
CI / Storybook smoke tests + visual regression (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Coverage snapshot / snapshot (push) Has been cancelled
Release Please / release-please (push) Has been cancelled
Sentry PII guard (R31) / pii-guard (push) Has been cancelled
Extends 8111639 to cover __factories__, __seeds__, __contracts__, and
core-testing barrels.
28 lines
787 B
TypeScript
28 lines
787 B
TypeScript
import { userFactory } from "../__factories__/user.factory";
|
|
import type { User } from "../entities/models/user";
|
|
|
|
/**
|
|
* Realistic auth seed for dev mode + storybook stories.
|
|
*
|
|
* Built from `userFactory` so factory defaults take care of boring fields
|
|
* and we only override what makes the data look like a real user database.
|
|
*
|
|
* Lazily produced so importing this module is side-effect-free — the
|
|
* factory's sequence counter only advances when a binder calls
|
|
* `buildDevUsers()`.
|
|
*/
|
|
export function buildDevUsers(): User[] {
|
|
return [
|
|
userFactory.build({
|
|
id: "alice",
|
|
username: "alice",
|
|
passwordHash: "hashed_secret_alice",
|
|
}),
|
|
userFactory.build({
|
|
id: "bob",
|
|
username: "bob",
|
|
passwordHash: "hashed_secret_bob",
|
|
}),
|
|
];
|
|
}
|