import { toEqualCaseInsensitive } from "https://deno.land/x/unitest@v1.0.0-beta.82/matcher/mod.ts";
Use .toEqualCaseInsensitive
when checking if a string
is equal to another
ignoring the casing of both strings
import {
defineExpect,
not,
test,
toEqualCaseInsensitive,
} from "https://deno.land/x/unitest@$VERSION/mod.ts";
const expect = defineExpect({
matcherMap: {
toEqualCaseInsensitive,
},
modifierMap: {
not,
},
});
test("passes when strings are equal ignoring case", () => {
expect("hello world").toEqualCaseInsensitive("hello world");
expect("hello world").toEqualCaseInsensitive("HELLO WORLD");
});