From 1789dfd5b93ea89bdf20c183899e4c0c90bd2b91 Mon Sep 17 00:00:00 2001 From: Renan Araujo Date: Fri, 19 May 2023 12:14:29 +0100 Subject: [PATCH] it is justa an and --- lib/src/cli/flutter_cli.dart | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/src/cli/flutter_cli.dart b/lib/src/cli/flutter_cli.dart index e8cc1ebd..2cece1af 100644 --- a/lib/src/cli/flutter_cli.dart +++ b/lib/src/cli/flutter_cli.dart @@ -398,19 +398,17 @@ Future _flutterTest({ var testPath = suite.path!; var testName = test.name; - if (optimizationApplied) { - // When there is a test error before any group is computed, it means - // that there is an error when compiling the test optimizer file. - if (groups.isNotEmpty) { - final topGroupName = _topGroupName(test, groups)!; - - testPath = testPath.replaceFirst( - _testOptimizerFileName, - topGroupName, - ); + // When there is a test error before any group is computed, it means + // that there is an error when compiling the test optimizer file. + if (optimizationApplied && groups.isNotEmpty) { + final topGroupName = _topGroupName(test, groups)!; - testName = testName.replaceFirst(topGroupName, '').trim(); - } + testPath = testPath.replaceFirst( + _testOptimizerFileName, + topGroupName, + ); + + testName = testName.replaceFirst(topGroupName, '').trim(); } final relativeTestPath = p.relative(testPath, from: cwd);