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