diff --git a/__tests__/users/[id]/user.id.test.index.ts b/__tests__/users/[id]/user.id.test.index.ts index 246a8bf0a8..5d833747d4 100644 --- a/__tests__/users/[id]/user.id.test.index.ts +++ b/__tests__/users/[id]/user.id.test.index.ts @@ -2,6 +2,7 @@ import handleUser from "@api/users/[id]"; import { createMocks } from "node-mocks-http"; import prisma from "@calcom/prisma"; +import { stringifyISODate } from "@lib/utils/stringifyISODate"; describe("GET /api/users/[id] with valid id as string returns an user-type", () => { it("returns a message with the specified events", async () => { @@ -15,7 +16,7 @@ describe("GET /api/users/[id] with valid id as string returns an user-type", () await handleUser(req, res); expect(res._getStatusCode()).toBe(200); - expect(JSON.parse(res._getData())).toStrictEqual({ data: user }); + expect(JSON.parse(res._getData())).toEqual({ data: {...user, createdDate: stringifyISODate(user?.createdDate), emailVerified: stringifyISODate(user?.emailVerified)} }); }); });