Untitled

mail@pastecode.io avatar
unknown
plain_text
5 months ago
295 B
3
Indexable
    it("test", async () => {
        const fakeDate = new Date("2023-04-22");

        console.log("Normal:   ", new Date().getTime());
        const spy = jest.spyOn(global, "Date").mockImplementation(() => fakeDate);
        console.log("Mocked:   ", new Date().getTime());



    });
Leave a Comment