Skip to content

Commit 3ab38ae

Browse files
committedNov 19, 2022
skipped tests only show as 'S' when running with -v
1 parent 55fc58d commit 3ab38ae

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
 

‎reporters/default_reporter.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ func (r *DefaultReporter) DidRun(report types.SpecReport) {
223223
showSeparateStdSection := inParallel && (report.CapturedStdOutErr != "")
224224

225225
// given all that - do we have any actual content to show? or are we a single denoter in a stream?
226-
reportHasContent := v.GTE(types.VerbosityLevelVerbose) || showTimeline || showSeparateVisibilityAlwaysReportsSection || showSeparateStdSection || report.Failed()
226+
reportHasContent := v.Is(types.VerbosityLevelVeryVerbose) || showTimeline || showSeparateVisibilityAlwaysReportsSection || showSeparateStdSection || report.Failed() || (v.Is(types.VerbosityLevelVerbose) && !report.State.Is(types.SpecStateSkipped))
227227

228228
// should we show a runtime?
229229
includeRuntime := !report.State.Is(types.SpecStateSkipped|types.SpecStatePending) || (report.State.Is(types.SpecStateSkipped) && report.Failure.Message != "")
@@ -249,8 +249,8 @@ func (r *DefaultReporter) DidRun(report types.SpecReport) {
249249
}
250250
case types.SpecStateSkipped:
251251
header = "S"
252-
if v.GTE(types.VerbosityLevelVerbose) {
253-
header = "S [SKIPPED]"
252+
if v.Is(types.VerbosityLevelVeryVerbose) || (v.Is(types.VerbosityLevelVerbose) && report.Failure.Message != "") {
253+
header, reportHasContent = "S [SKIPPED]", true
254254
}
255255
default:
256256
header = fmt.Sprintf("%s [%s]", header, r.humanReadableState(report.State))

‎reporters/default_reporter_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -854,15 +854,15 @@ var _ = Describe("DefaultReporter", func() {
854854
// Skipped tests
855855
Entry("a skipped test",
856856
S(types.NodeTypeIt, "A", types.SpecStateSkipped, cl0),
857-
Case(Succinct, Normal, Succinct|Parallel, Normal|Parallel,
857+
Case(Succinct, Normal, Succinct|Parallel, Normal|Parallel, Verbose, Verbose|Parallel,
858858
"{{cyan}}S{{/}}"),
859-
Case(Verbose, VeryVerbose,
859+
Case(VeryVerbose,
860860
"{{cyan}}S [SKIPPED]{{/}}",
861861
"{{cyan}}{{bold}}A{{/}}",
862862
"{{gray}}cl0.go:12{{/}}",
863863
DELIMITER,
864864
""),
865-
Case(Verbose|Parallel, VeryVerbose|Parallel,
865+
Case(VeryVerbose|Parallel,
866866
DELIMITER,
867867
"{{cyan}}S [SKIPPED]{{/}}",
868868
"{{cyan}}{{bold}}A{{/}}",

0 commit comments

Comments
 (0)
Please sign in to comment.