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