callCount static method

int callCount(
  1. String endpoint, {
  2. String? method,
})

Get the number of times an endpoint was called.

Implementation

static int callCount(String endpoint, {String? method}) {
  return getCallsFor(endpoint).where((c) {
    if (method != null && c.method != method.toUpperCase()) return false;
    return true;
  }).length;
}