Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update index.test.ts

Kiran K7ef1bce2a48d
diff --git a/apps/web/tests/webhooks/index.test.ts b/apps/web/tests/webhooks/index.test.ts
index 32d0edddf5..29d2c72079 100644
--- a/apps/web/tests/webhooks/index.test.ts
+++ b/apps/web/tests/webhooks/index.test.ts
@@ -97,10 +97,12 @@ const assertQstashMessage = async (
expect(receivedBody.data).toEqual(body);
if (trigger === "partner.created") {
- EnrolledPartnerSchema.extend({
- createdAt: z.string().transform((str) => new Date(str)),
- updatedAt: z.string().transform((str) => new Date(str)),
- });
+ expect(
+ EnrolledPartnerSchema.extend({
+ createdAt: z.string().transform((str) => new Date(str)),
+ updatedAt: z.string().transform((str) => new Date(str)),
+ }).safeParse(receivedBody.data).success,
+ ).toBe(true);
} else {
expect(eventSchemas[trigger].safeParse(receivedBody.data).success).toBe(
true,