File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,11 @@ var RunTestsCmd = &cobra.Command{
8383 fmt .Printf ("All test results saved to %s\n " , outputPath )
8484 }
8585
86+ if len (testReport .Results ) == 0 {
87+ fmt .Printf ("No tests were run for the specified packages.\n " )
88+ return
89+ }
90+
8691 // Filter flaky tests using FilterTests
8792 flakyTests := reports .FilterTests (testReport .Results , func (tr reports.TestResult ) bool {
8893 return ! tr .Skipped && tr .PassRatio < maxPassRatio
@@ -94,8 +99,6 @@ var RunTestsCmd = &cobra.Command{
9499 reports .RenderResults (os .Stdout , flakyTests , maxPassRatio , false )
95100 // Exit with error code if there are flaky tests
96101 os .Exit (1 )
97- } else if len (testReport .Results ) == 0 {
98- fmt .Printf ("No tests were run for the specified packages.\n " )
99102 }
100103 },
101104}
You can’t perform that action at this time.
0 commit comments