mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
More unit tests
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import timekeeper from "timekeeper";
|
||||
import isBeforeDate from "./isBeforeDate";
|
||||
|
||||
it("works correctly", () => {
|
||||
timekeeper.freeze(new Date("2018-07-06T18:24:00.000Z"));
|
||||
expect(isBeforeDate(new Date("2018-07-06T18:24:30.000Z"))).toBe(true);
|
||||
expect(isBeforeDate(new Date("2018-07-06T18:23:30.000Z"))).toBe(false);
|
||||
timekeeper.reset();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user