expectLatency static method
Asserts that response latency does not exceed maximum.
Implementation
static void expectLatency(HttpResponseSpec response, Duration maximum) {
if (response.latency > maximum) {
throw StateError('Latency ${response.latency} exceeded $maximum');
}
}