assertNotMatch
import { assertNotMatch } from "jsr:@ende/assert";function
function assertNotMatch(actual: string, expected: RegExp, msg?: string): voidMake an assertion that actual not match RegExp expected. If match
then throw.
actual: stringThe actual value to match.
expected: RegExpThe expected value to not match.
msg?: stringThe optional message to display if the assertion fails.
Example: Usage
import { assertNotMatch } from "@ende/assert";
assertNotMatch("Denosaurus", /Raptor/); // Doesn't throw
assertNotMatch("Raptor", /Raptor/); // Throws