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.

chore: Refactor create-tag.test.ts to improve test reliability

Kiran K738141369f14
diff --git a/apps/web/tests/tags/create-tag.test.ts b/apps/web/tests/tags/create-tag.test.ts
index d090f20cf2..93442c4bd9 100644
--- a/apps/web/tests/tags/create-tag.test.ts
+++ b/apps/web/tests/tags/create-tag.test.ts
@@ -1,13 +1,10 @@
import { Tag } from "@prisma/client";
import { afterAll, expect, test } from "vitest";
import { IntegrationHarness } from "../utils/integration";
-import { expectedTag } from "../utils/schema";
test("POST /tags", async (ctx) => {
const h = new IntegrationHarness(ctx);
- const { workspace, http } = await h.init();
- const workspaceId = workspace.id;
- const projectId = workspaceId.replace("ws_", "");
+ const { http } = await h.init();
const { status, data: tag } = await http.post<Tag>({
path: "/tags",
@@ -19,10 +16,9 @@ test("POST /tags", async (ctx) => {
expect(status).toEqual(201);
expect(tag).toStrictEqual({
- ...expectedTag,
+ id: expect.any(String),
name: "social",
color: "red",
- projectId,
});
afterAll(async () => {