Skip to content

Commit

Permalink
Unskip getSchedule tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hariombalhara committed Aug 17, 2022
1 parent fe32a87 commit 9c774f0
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions apps/web/test/lib/getSchedule.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,6 @@ import prisma from "@calcom/prisma";
import { BookingStatus, PeriodType } from "@calcom/prisma/client";
import { getSchedule } from "@calcom/trpc/server/routers/viewer/slots";

jest.mock("uuid", () => ({
v4: () => `uuidv4`,
}));

jest.mock("ics", () => ({
createEvent: () => ({ error: null, value: "iCalString" }),
}));

jest.mock("@calcom/core/getUserAvailability", () => ({
getUserAvailability: async () => ({
busy: [],
timeZone: "America/Mazatlan",
workingHours: [],
currentSeats: [],
}),
}));

afterEach(() => {
jest.resetAllMocks();
});

declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace jest {
Expand Down Expand Up @@ -302,7 +281,7 @@ afterEach(async () => {

describe("getSchedule", () => {
describe("User Event", () => {
test.skip("correctly identifies unavailable slots from Cal Bookings", async () => {
test("correctly identifies unavailable slots from Cal Bookings", async () => {
// const { dateString: todayDateString } = getDate();
const { dateString: plus1DateString } = getDate({ dateIncrement: 1 });
const { dateString: plus2DateString } = getDate({ dateIncrement: 2 });
Expand Down Expand Up @@ -397,7 +376,7 @@ describe("getSchedule", () => {
);
});

test.skip("correctly identifies unavailable slots from calendar", async () => {
test("correctly identifies unavailable slots from calendar", async () => {
const { dateString: plus1DateString } = getDate({ dateIncrement: 1 });
const { dateString: plus2DateString } = getDate({ dateIncrement: 2 });

Expand Down Expand Up @@ -477,7 +456,7 @@ describe("getSchedule", () => {
});

describe("Team Event", () => {
test.skip("correctly identifies unavailable slots from calendar", async () => {
test("correctly identifies unavailable slots from calendar", async () => {
const { dateString: todayDateString } = getDate();

const { dateString: plus1DateString } = getDate({ dateIncrement: 1 });
Expand Down

0 comments on commit 9c774f0

Please sign in to comment.