diff --git a/packages/dart_frog_cli/test/src/command_runner_test.dart b/packages/dart_frog_cli/test/src/command_runner_test.dart index 426268fe8..668fb2588 100644 --- a/packages/dart_frog_cli/test/src/command_runner_test.dart +++ b/packages/dart_frog_cli/test/src/command_runner_test.dart @@ -98,12 +98,18 @@ void main() { any( that: predicate((message) { final containsError = message.contains( - 'Could not find an option named "invalid-option".', + 'Could not find an option named ', ); + final contiansInvalidOption = message.contains( + '"invalid-option"', + ) || + message.contains( + '"--invalid-option"', + ); final containsUsage = message.contains( 'Usage: dart_frog [arguments]', ); - return containsError && containsUsage; + return containsError && contiansInvalidOption && containsUsage; }), ), ),