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