expectErrorRecorded method
Implementation
void expectErrorRecorded(String? contains) {
final errors = context.runtime.flutterErrors;
if (errors.isEmpty) {
throw EnsembleTestFailure('Expected a recorded error, but none found.');
}
if (contains != null && !errors.any((e) => e.contains(contains))) {
throw EnsembleTestFailure(
'Expected error containing "$contains", got: $errors',
);
}
}