Files
full-stack-fastapi/frontend/tests/utils/random.ts
Alejandra 43fac49a14 Add items and admin tests, and refactor existing ones (#2146)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-23 17:27:17 +01:00

20 lines
584 B
TypeScript

export const randomEmail = () =>
`test_${Math.random().toString(36).substring(7)}@example.com`
export const randomTeamName = () =>
`Team ${Math.random().toString(36).substring(7)}`
export const randomPassword = () => `${Math.random().toString(36).substring(2)}`
export const slugify = (text: string) =>
text
.toLowerCase()
.replace(/\s+/g, "-")
.replace(/[^\w-]+/g, "")
export const randomItemTitle = () =>
`Item ${Math.random().toString(36).substring(7)}`
export const randomItemDescription = () =>
`Description ${Math.random().toString(36).substring(7)}`