expectLastApiCall method
Implementation
void expectLastApiCall(String apiName) {
final calls = context.apiOverlay.calls;
if (calls.isEmpty || calls.last.name != apiName) {
throw EnsembleTestFailure(
'Expected last API call to be "$apiName", '
'but got ${calls.isEmpty ? "none" : calls.last.name}.',
);
}
}