The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix track click tests
Steven Teyeb717bf0cf1b
diff --git a/apps/web/tests/tracks/track-click.test.ts b/apps/web/tests/tracks/track-click.test.tsindex 2a1baee4bc..5f7a4f6a85 100644--- a/apps/web/tests/tracks/track-click.test.ts+++ b/apps/web/tests/tracks/track-click.test.ts@@ -20,8 +20,6 @@ const expectValidClickResponse = ({id: expect.any(String),name: expect.any(String),image: expect.any(String),- groupId: expect.any(String),- tenantId: expect.any(String),}),}),...(hasDiscount && {@@ -35,6 +33,19 @@ const expectValidClickResponse = ({}),}),});++ // Check nullish fields separately if partner exists+ if (hasPartner && response.data.partner) {+ const { groupId, tenantId } = response.data.partner;+ expect(+ groupId === null || groupId === undefined || typeof groupId === "string",+ ).toBe(true);+ expect(+ tenantId === null ||+ tenantId === undefined ||+ typeof tenantId === "string",+ ).toBe(true);+ }};describe("POST /track/click", async () => {