import { toBeAfter } from "https://deno.land/x/unitest@v1.0.0-beta.82/mod.ts";
Use .toBeAfter
when checking if a date occurs after date
import {
defineExpect,
not,
test,
toBeAfter,
} from "https://deno.land/x/unitest@$VERSION/mod.ts";
const expect = defineExpect({
matcherMap: {
toBeAfter,
},
modifierMap: {
not,
},
});
test("passes when input is after date", () => {
expect(new Date("01/01/2019")).toBeAfter(new Date("01/01/2018"));
expect(new Date("01/01/2018")).not.toBeAfter(new Date("01/01/2019"));
});