import { toBeEven } from "https://deno.land/x/unitest@v1.0.0-beta.82/matcher/mod.ts";
Use .toBeEven
when checking if a value is an even Number
import {
defineExpect,
not,
test,
toBeEven,
} from "https://deno.land/x/unitest@$VERSION/mod.ts";
const expect = defineExpect({
matcherMap: {
toBeEven,
},
modifierMap: {
not,
},
});
test("passes when value is an even number", () => {
expect(2).toBeEven();
expect(1).not.toBeEven();
expect(NaN).not.toBeEven();
});