Skip to main content
Module

x/unitest/mod.ts>toEqualCaseInsensitive

🃏 Deno-first universal unit testing framework
Latest
function toEqualCaseInsensitive
Re-export
import { toEqualCaseInsensitive } from "https://deno.land/x/unitest@v1.0.0-beta.82/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");
});

Parameters

actual: string
expected: string