expectLastApiCall method

void expectLastApiCall(
  1. String apiName
)

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}.',
    );
  }
}