File: reporter.go

package info (click to toggle)
golang-github-onsi-ginkgo-v2 2.22.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,060 kB
  • sloc: javascript: 59; makefile: 23; sh: 14
file content (29 lines) | stat: -rw-r--r-- 1,143 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package reporters

import (
	"github.com/onsi/ginkgo/v2/types"
)

type Reporter interface {
	SuiteWillBegin(report types.Report)
	WillRun(report types.SpecReport)
	DidRun(report types.SpecReport)
	SuiteDidEnd(report types.Report)

	//Timeline emission
	EmitFailure(state types.SpecState, failure types.Failure)
	EmitProgressReport(progressReport types.ProgressReport)
	EmitReportEntry(entry types.ReportEntry)
	EmitSpecEvent(event types.SpecEvent)
}

type NoopReporter struct{}

func (n NoopReporter) SuiteWillBegin(report types.Report)                       {}
func (n NoopReporter) WillRun(report types.SpecReport)                          {}
func (n NoopReporter) DidRun(report types.SpecReport)                           {}
func (n NoopReporter) SuiteDidEnd(report types.Report)                          {}
func (n NoopReporter) EmitFailure(state types.SpecState, failure types.Failure) {}
func (n NoopReporter) EmitProgressReport(progressReport types.ProgressReport)   {}
func (n NoopReporter) EmitReportEntry(entry types.ReportEntry)                  {}
func (n NoopReporter) EmitSpecEvent(event types.SpecEvent)                      {}