Skip to main content
Module

x/unitest/mod.ts>stringMatching

🃏 Deno-first universal unit testing framework
Latest
function stringMatching
import { stringMatching } from "https://deno.land/x/unitest@v1.0.0-beta.82/mod.ts";

matches string or regular expression

You should actual value is string

import {
  any,
  expect,
  stringMatching,
  test,
} from "https://deno.land/x/unitest@$VERSION/mod.ts";

test("should be match pattern", () => {
  expect("hello! This is a good day.").toEqual(stringMatching(/good/));
});

Parameters

expected: string | RegExp

Returns

StringMatching