The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update upsert-link.test.ts
Steven Tey716f80f32e24
diff --git a/apps/web/tests/links/upsert-link.test.ts b/apps/web/tests/links/upsert-link.test.tsindex abf321c3f9..0de3109836 100644--- a/apps/web/tests/links/upsert-link.test.ts+++ b/apps/web/tests/links/upsert-link.test.ts@@ -14,6 +14,8 @@ describe.sequential("PUT /links/upsert", async () => {const { workspaceId } = workspace;const projectId = workspaceId.replace("ws_", "");+ let createdLink: Link;+test("New link", async () => {const { data: createdLink } = await http.put<Link>({path: "/links/upsert",@@ -33,16 +35,16 @@ describe.sequential("PUT /links/upsert", async () => {tags: [],});- test("Existing link", async () => {- const { data: updatedLink } = await http.put<Link>({- path: "/links/upsert",- query: { workspaceId },- body: { domain, url },- });+ await h.deleteLink(createdLink.id);+ });- expect(updatedLink).toStrictEqual(createdLink);+ test("Existing link", async () => {+ const { data: updatedLink } = await http.put<Link>({+ path: "/links/upsert",+ query: { workspaceId },+ body: { domain, url },});- await h.deleteLink(createdLink.id);+ expect(updatedLink).toStrictEqual(createdLink);});});