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.

extend linkschema

Steven Tey91a899405870
diff --git a/apps/web/tests/links/bulk-create-link.test.ts b/apps/web/tests/links/bulk-create-link.test.ts
index 75cc738a11..367bb13e43 100644
--- a/apps/web/tests/links/bulk-create-link.test.ts
+++ b/apps/web/tests/links/bulk-create-link.test.ts
@@ -1,11 +1,10 @@
import z from "@/lib/zod";
-import { LinkSchema } from "@/lib/zod/schemas/links";
import { Link } from "@prisma/client";
import { expect, test } from "vitest";
import { randomId } from "../utils/helpers";
import { IntegrationHarness } from "../utils/integration";
import { E2E_LINK } from "../utils/resource";
-import { expectedLink } from "../utils/schema";
+import { LinkSchema, expectedLink } from "../utils/schema";
const { domain } = E2E_LINK;
diff --git a/apps/web/tests/links/create-link.test.ts b/apps/web/tests/links/create-link.test.ts
index c6a3e173e7..42170be58f 100644
--- a/apps/web/tests/links/create-link.test.ts
+++ b/apps/web/tests/links/create-link.test.ts
@@ -1,11 +1,10 @@
-import { LinkSchema } from "@/lib/zod/schemas/links";
import { Link, Tag } from "@prisma/client";
import { IntegrationHarnessOld } from "tests/utils/integration-old";
import { afterAll, describe, expect, test } from "vitest";
import { randomId } from "../utils/helpers";
import { IntegrationHarness } from "../utils/integration";
import { E2E_LINK, E2E_WEBHOOK_ID } from "../utils/resource";
-import { expectedLink } from "../utils/schema";
+import { LinkSchema, expectedLink } from "../utils/schema";
const { domain, url } = E2E_LINK;
diff --git a/apps/web/tests/utils/schema.ts b/apps/web/tests/utils/schema.ts
index 9a33af0f01..19a6ec064d 100644
--- a/apps/web/tests/utils/schema.ts
+++ b/apps/web/tests/utils/schema.ts
@@ -1,6 +1,12 @@
+import z from "@/lib/zod";
+import { LinkSchema as LinkSchemaOld } from "@/lib/zod/schemas/links";
import { Link, Project, Tag } from "@prisma/client";
import { expect } from "vitest";
+export const LinkSchema = LinkSchemaOld.extend({
+ identifier: z.null(),
+});
+
export const expectedLink: Partial<Link> & {
identifier: null;
tagId: string | null;