Make an assertion that actual match RegExp expected. If not then throw.
actual
expected
Optional
24.7.0
import { assertMatch } from "assert";assertMatch("Raptor", RegExp(/Raptor/)); // Doesn't throwassertMatch("Bingosaurus", RegExp(/Raptor/)); // Throws Copy
import { assertMatch } from "assert";assertMatch("Raptor", RegExp(/Raptor/)); // Doesn't throwassertMatch("Bingosaurus", RegExp(/Raptor/)); // Throws
Make an assertion that
actual
match RegExpexpected
. If not then throw.