The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix tests final
Steven Teyc6a7cf64ebe7
diff --git a/apps/web/tests/utils/helpers.ts b/apps/web/tests/utils/helpers.tsindex a2fa226a28..3c082b4f98 100644--- a/apps/web/tests/utils/helpers.ts+++ b/apps/web/tests/utils/helpers.ts@@ -1,17 +1,17 @@import { generateRandomName } from "@/lib/names";+import { nanoid } from "@dub/utils";-export const randomId = () => Math.random().toString(36).substr(2, 9);+export const randomId = () => nanoid(24);// Generate random customer dataexport const randomCustomer = () => {- const customerId = randomId();+ const customerId = `cus_${randomId()}`;const customerName = generateRandomName();return {id: customerId,name: customerName,- email: `${customerName.replace(" ", ".").toLowerCase()}@example.com`,+ email: `${customerName.split(" ").join(".").toLowerCase()}@example.com`,avatar: `https://api.dicebear.com/9.x/notionists/png?seed=${customerId}`,- metadata: { plan: "enterprise" },};};