import { toBeNil } from "https://deno.land/x/unitest@v1.0.0-beta.82/matcher/mod.ts";
Use .toBeNil
when checking a value is null
or undefined
import {
defineExpect,
not,
test,
toBeNil,
} from "https://deno.land/x/unitest@$VERSION/mod.ts";
const expect = defineExpect({
matcherMap: {
toBeNil,
},
modifierMap: {
not,
},
});
test("passes when value is null or undefined", () => {
expect(null).toBeNil();
expect(undefined).toBeNil();
expect(true).not.toBeNil();
});