diff --git a/packages/flutter/lib/src/foundation/diagnostics.dart b/packages/flutter/lib/src/foundation/diagnostics.dart index 0974841189..a1af8f7c3a 100644 --- a/packages/flutter/lib/src/foundation/diagnostics.dart +++ b/packages/flutter/lib/src/foundation/diagnostics.dart @@ -3032,7 +3032,10 @@ String describeIdentity(Object? object) => '${objectRuntimeType(object, ' describeEnum('Hello World'), + throwsA(isAssertionError.having( + (AssertionError e) => e.message, + 'message', + 'The provided object "Hello World" is not an enum.'), + ), + ); }); test('string property test', () {