expectRegexMatch function
Expect that value
matches with regex
.
Implementation
void expectRegexMatch(
String value,
RegExp regex, {
String? reason,
dynamic skip, // true or a String
}) {
final matcher = predicate<String>(
(obj) => regex.hasMatch(obj),
"Should MATCH the regular expression: /${regex.pattern}/",
);
expect(
value,
matcher,
reason: reason,
skip: skip,
);
}