noteshare.space/server/src/util.unit.test.ts
2022-07-09 13:02:35 +02:00

11 lines
317 B
TypeScript

import { describe, it, expect } from "vitest";
import { addDays } 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);
});
});