Consolidates dayjs in a single package
This commit is contained in:
1 parent
5be669a479
commit
7122a4a91d
80 files changed
+120
-299
No files matched your search
@@ -1,12 +1,11 @@
|
||||
import { expect, it } from "@jest/globals";
|
||||
import { Availability } from "@prisma/client";
|
||||
import dayjs from "dayjs";
|
||||
import customParseFormat from "dayjs/plugin/customParseFormat";
|
||||
import MockDate from "mockdate";
|
||||
|
||||
import dayjs from "@calcom/dayjs";
|
||||
|
||||
import { getAvailabilityFromSchedule } from "@lib/availability";
|
||||
|
||||
dayjs.extend(customParseFormat);
|
||||
MockDate.set("2021-06-20T11:59:59Z");
|
||||
|
||||
//parse "hh:mm-hh:mm" into <Availability> object
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
import { expect, it } from "@jest/globals";
|
||||
import dayjs from "dayjs";
|
||||
import timezone from "dayjs/plugin/timezone";
|
||||
import utc from "dayjs/plugin/utc";
|
||||
import MockDate from "mockdate";
|
||||
|
||||
import { getWorkingHours } from "@lib/availability";
|
||||
import dayjs from "@calcom/dayjs";
|
||||
|
||||
dayjs.extend(utc);
|
||||
dayjs.extend(timezone);
|
||||
import { getWorkingHours } from "@lib/availability";
|
||||
|
||||
MockDate.set("2021-06-20T11:59:59Z");
|
||||
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import dayjs from "dayjs";
|
||||
import utc from "dayjs/plugin/utc";
|
||||
|
||||
import { parseZone } from "@lib/parseZone";
|
||||
|
||||
dayjs.extend(utc);
|
||||
|
||||
const EXPECTED_DATE_STRING = "2021-06-20T11:59:59+02:00";
|
||||
|
||||
it("has the right utcOffset regardless of the local timeZone", async () => {
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
import { expect, it } from "@jest/globals";
|
||||
import dayjs from "dayjs";
|
||||
import timezone from "dayjs/plugin/timezone";
|
||||
import utc from "dayjs/plugin/utc";
|
||||
import MockDate from "mockdate";
|
||||
|
||||
import dayjs from "@calcom/dayjs";
|
||||
|
||||
import { MINUTES_DAY_END, MINUTES_DAY_START } from "@lib/availability";
|
||||
import { getFilteredTimes } from "@lib/hooks/useSlots";
|
||||
import getSlots from "@lib/slots";
|
||||
|
||||
dayjs.extend(utc);
|
||||
dayjs.extend(timezone);
|
||||
|
||||
MockDate.set("2021-06-20T11:59:59Z");
|
||||
|
||||
it("can fit 24 hourly slots for an empty day", async () => {
|
||||
|
||||
Reference in new issue
Block a user