noteshare.space/server/src/util.unit.test.ts
2022-08-11 14:59:48 +02:00

11 lines
334 B
TypeScript

import { describe, it, expect } from "vitest";
import { addDays, getConnectingIp } from "./util";
describe("addDays()", () => {
it("Should add n days to the input date", () => {
const date = new Date("2022-01-01");
const expectedDate = new Date("2022-01-31");
expect(addDays(date, 30)).toEqual(expectedDate);
});
});