expectRegexMatch function

void expectRegexMatch(
  1. String value,
  2. RegExp regex, {
  3. dynamic skip,
})

Implementation

void expectRegexMatch(
  String value,
  RegExp regex, {
  dynamic skip, // true or a String
}) {
  final matcher = predicate<String>((obj) => regex.hasMatch(obj));
  expect(
    value,
    matcher,
    skip: skip,
    reason: "Does not match the regular expression: ${regex.pattern}",
  );
}