Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
skipped tests only show as 'S' when running with -v
  • Loading branch information
onsi committed Nov 19, 2022
1 parent 55fc58d commit 3ab38ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions reporters/default_reporter.go
Expand Up @@ -223,7 +223,7 @@ func (r *DefaultReporter) DidRun(report types.SpecReport) {
showSeparateStdSection := inParallel && (report.CapturedStdOutErr != "")

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

// should we show a runtime?
includeRuntime := !report.State.Is(types.SpecStateSkipped|types.SpecStatePending) || (report.State.Is(types.SpecStateSkipped) && report.Failure.Message != "")
Expand All @@ -249,8 +249,8 @@ func (r *DefaultReporter) DidRun(report types.SpecReport) {
}
case types.SpecStateSkipped:
header = "S"
if v.GTE(types.VerbosityLevelVerbose) {
header = "S [SKIPPED]"
if v.Is(types.VerbosityLevelVeryVerbose) || (v.Is(types.VerbosityLevelVerbose) && report.Failure.Message != "") {
header, reportHasContent = "S [SKIPPED]", true
}
default:
header = fmt.Sprintf("%s [%s]", header, r.humanReadableState(report.State))
Expand Down
6 changes: 3 additions & 3 deletions reporters/default_reporter_test.go
Expand Up @@ -854,15 +854,15 @@ var _ = Describe("DefaultReporter", func() {
// Skipped tests
Entry("a skipped test",
S(types.NodeTypeIt, "A", types.SpecStateSkipped, cl0),
Case(Succinct, Normal, Succinct|Parallel, Normal|Parallel,
Case(Succinct, Normal, Succinct|Parallel, Normal|Parallel, Verbose, Verbose|Parallel,
"{{cyan}}S{{/}}"),
Case(Verbose, VeryVerbose,
Case(VeryVerbose,
"{{cyan}}S [SKIPPED]{{/}}",
"{{cyan}}{{bold}}A{{/}}",
"{{gray}}cl0.go:12{{/}}",
DELIMITER,
""),
Case(Verbose|Parallel, VeryVerbose|Parallel,
Case(VeryVerbose|Parallel,
DELIMITER,
"{{cyan}}S [SKIPPED]{{/}}",
"{{cyan}}{{bold}}A{{/}}",
Expand Down

0 comments on commit 3ab38ae

Please sign in to comment.