Matcher isBefore(DateTime date)

Validates that a DateTime is before date.

When using this matcher with methods like expectResponse, hasResponse, hasHeaders, hasBody, the compared value will be parsed into a DateTime prior to running this matcher.

Source

Matcher isBefore(DateTime date) {
  return predicate((DateTime d) => d.isBefore(date),
      "before ${date.toIso8601String()}");
}