package test_helpers
import "github.com/onsi/ginkgo/v2/internal/test_helpers"
Index ¶
- Variables
- func BeASuiteSummary(options ...any) OmegaMatcher
- func BePending() OmegaMatcher
- func BeProgressReport(options ...any) OmegaMatcher
- func BeReportEntry(options ...any) OmegaMatcher
- func BeSpecEvent(options ...any) OmegaMatcher
- func BeTimelineContaining(matchers ...OmegaMatcher) OmegaMatcher
- func BeTimelineExactlyMatching(matchers ...OmegaMatcher) OmegaMatcher
- func HaveAborted(options ...any) OmegaMatcher
- func HaveBeenInterrupted(cause interrupt_handler.InterruptCause) OmegaMatcher
- func HaveBeenSkipped() OmegaMatcher
- func HaveBeenSkippedWithMessage(message string, options ...any) OmegaMatcher
- func HaveFailed(options ...any) OmegaMatcher
- func HavePanicked(options ...any) OmegaMatcher
- func HavePassed(options ...any) OmegaMatcher
- func HaveRun(run string) OmegaMatcher
- func HaveRunWithData(run string, kv ...any) OmegaMatcher
- func HaveTimedOut(options ...any) OmegaMatcher
- func HaveTracked(runs ...string) OmegaMatcher
- func HaveTrackedNothing() OmegaMatcher
- func LoadMarkdownHeadings(filename string) ([]string, error)
- func LoadMarkdownLinks(filename string) ([]string, error)
- func MatchLines(expected ...any) gcustom.CustomGomegaMatcher
- func MultilineTextHelper(s string) string
- func SetUpServerAndClient(numNodes int) (parallel_support.Server, parallel_support.Client, map[int]chan any)
- func StatusCodePoller(url string) func() int
- func TLWithOffset[O int | string](o O) types.TimelineLocation
- type Anchors
- func LoadAnchors(docs Docs, rootPath string) (Anchors, error)
- func (a Anchors) IsResolvable(docName string, link string) bool
- type CapturedGinkgoWriterOutput
- type CapturedStdOutput
- type Doc
- type Docs
- type FailureNodeType
- type FakeInterruptHandler
- func NewFakeInterruptHandler() *FakeInterruptHandler
- func (handler *FakeInterruptHandler) Interrupt(cause interrupt_handler.InterruptCause)
- func (handler *FakeInterruptHandler) Status() interrupt_handler.InterruptStatus
- type FakeOutputInterceptor
- func NewFakeOutputInterceptor() *FakeOutputInterceptor
- func (interceptor *FakeOutputInterceptor) AppendInterceptedOutput(s string)
- func (interceptor *FakeOutputInterceptor) PauseIntercepting()
- func (interceptor *FakeOutputInterceptor) ResumeIntercepting()
- func (interceptor *FakeOutputInterceptor) Shutdown()
- func (interceptor *FakeOutputInterceptor) StartInterceptingOutput()
- func (interceptor *FakeOutputInterceptor) StartInterceptingOutputAndForwardTo(w io.Writer)
- func (interceptor *FakeOutputInterceptor) StopInterceptingAndReturnOutput() string
- type FakeReporter
- func NewFakeReporter() *FakeReporter
- func (r *FakeReporter) DidRun(report types.SpecReport)
- func (r *FakeReporter) EmitFailure(state types.SpecState, failure types.Failure)
- func (r *FakeReporter) EmitProgressReport(progressReport types.ProgressReport)
- func (r *FakeReporter) EmitReportEntry(reportEntry types.ReportEntry)
- func (r *FakeReporter) EmitSpecEvent(specEvent types.SpecEvent)
- func (r *FakeReporter) SuiteDidEnd(report types.Report)
- func (r *FakeReporter) SuiteWillBegin(report types.Report)
- func (r *FakeReporter) WillRun(report types.SpecReport)
- type HaveTrackedMatcher
- func (m *HaveTrackedMatcher) FailureMessage(actual any) string
- func (m *HaveTrackedMatcher) Match(actual any) (bool, error)
- func (m *HaveTrackedMatcher) NegatedFailureMessage(actual any) string
- type NFailed
- type NFlaked
- type NPassed
- type NPending
- type NSkipped
- type NSpecs
- type NWillRun
- type NumAttempts
- type OmegaMatcherWithDescription
- type Reports
- func (s Reports) Find(name string) types.SpecReport
- func (s Reports) FindByFullText(text string) types.SpecReport
- func (s Reports) FindByLeafNodeType(nodeTypes types.NodeType) types.SpecReport
- func (s Reports) Names() []string
- func (s Reports) WithLeafNodeType(nodeTypes types.NodeType) Reports
- func (s Reports) WithState(state types.SpecState) Reports
- type RunTracker
- func NewRunTracker() *RunTracker
- func (rt *RunTracker) C(text string, callback ...func()) func(args []string, additionalArgs []string)
- func (rt *RunTracker) DataFor(text string) map[string]any
- func (rt *RunTracker) Reset()
- func (rt *RunTracker) Run(text string)
- func (rt *RunTracker) RunWithData(text string, kv ...any)
- func (rt *RunTracker) T(text string, callback ...func()) func()
- func (rt *RunTracker) TSC(text string, callback ...func(internal.SpecContext)) func(internal.SpecContext)
- func (rt *RunTracker) TrackedRuns() []string
Variables ¶
var DOCS = Docs{ {"index.md", []string{"https://onsi.github.io/ginkgo/"}, "docs/index.md"}, {"MIGRATING_TO_V2.md", []string{"https://onsi.github.io/ginkgo/MIGRATING_TO_V2"}, "docs/MIGRATING_TO_V2.md"}, {"README.md", []string{"https://github.com/onsi/ginkgo", "https://github.com/onsi/ginkgo/blob/master/README.md"}, "README.md"}, }
Functions ¶
func BeASuiteSummary ¶
func BeASuiteSummary(options ...any) OmegaMatcher
func BePending ¶
func BePending() OmegaMatcher
func BeProgressReport ¶
func BeProgressReport(options ...any) OmegaMatcher
func BeReportEntry ¶
func BeReportEntry(options ...any) OmegaMatcher
func BeSpecEvent ¶
func BeSpecEvent(options ...any) OmegaMatcher
func BeTimelineContaining ¶
func BeTimelineContaining(matchers ...OmegaMatcher) OmegaMatcher
func BeTimelineExactlyMatching ¶
func BeTimelineExactlyMatching(matchers ...OmegaMatcher) OmegaMatcher
func HaveAborted ¶
func HaveAborted(options ...any) OmegaMatcher
func HaveBeenInterrupted ¶
func HaveBeenInterrupted(cause interrupt_handler.InterruptCause) OmegaMatcher
func HaveBeenSkipped ¶
func HaveBeenSkipped() OmegaMatcher
func HaveBeenSkippedWithMessage ¶
func HaveFailed ¶
func HaveFailed(options ...any) OmegaMatcher
func HavePanicked ¶
func HavePanicked(options ...any) OmegaMatcher
func HavePassed ¶
func HavePassed(options ...any) OmegaMatcher
func HaveRun ¶
func HaveRun(run string) OmegaMatcher
func HaveRunWithData ¶
func HaveTimedOut ¶
func HaveTimedOut(options ...any) OmegaMatcher
func HaveTracked ¶
func HaveTracked(runs ...string) OmegaMatcher
func HaveTrackedNothing ¶
func HaveTrackedNothing() OmegaMatcher
func LoadMarkdownHeadings ¶
func LoadMarkdownLinks ¶
func MatchLines ¶
func MatchLines(expected ...any) gcustom.CustomGomegaMatcher
func MultilineTextHelper ¶
func SetUpServerAndClient ¶
func SetUpServerAndClient(numNodes int) (parallel_support.Server, parallel_support.Client, map[int]chan any)
func StatusCodePoller ¶
func TLWithOffset ¶
func TLWithOffset[O int | string](o O) types.TimelineLocation
Types ¶
type Anchors ¶
func LoadAnchors ¶
func (Anchors) IsResolvable ¶
type CapturedGinkgoWriterOutput ¶
type CapturedGinkgoWriterOutput string
type CapturedStdOutput ¶
type CapturedStdOutput string
type Doc ¶
func (Doc) Path ¶
type Docs ¶
type Docs []Doc
func (Docs) DocWithName ¶
func (Docs) DocWithURL ¶
type FailureNodeType ¶
type FakeInterruptHandler ¶
type FakeInterruptHandler struct {
// contains filtered or unexported fields
}
func NewFakeInterruptHandler ¶
func NewFakeInterruptHandler() *FakeInterruptHandler
func (*FakeInterruptHandler) Interrupt ¶
func (handler *FakeInterruptHandler) Interrupt(cause interrupt_handler.InterruptCause)
func (*FakeInterruptHandler) Status ¶
func (handler *FakeInterruptHandler) Status() interrupt_handler.InterruptStatus
type FakeOutputInterceptor ¶
type FakeOutputInterceptor struct {
// contains filtered or unexported fields
}
func NewFakeOutputInterceptor ¶
func NewFakeOutputInterceptor() *FakeOutputInterceptor
func (*FakeOutputInterceptor) AppendInterceptedOutput ¶
func (interceptor *FakeOutputInterceptor) AppendInterceptedOutput(s string)
func (*FakeOutputInterceptor) PauseIntercepting ¶
func (interceptor *FakeOutputInterceptor) PauseIntercepting()
func (*FakeOutputInterceptor) ResumeIntercepting ¶
func (interceptor *FakeOutputInterceptor) ResumeIntercepting()
func (*FakeOutputInterceptor) Shutdown ¶
func (interceptor *FakeOutputInterceptor) Shutdown()
func (*FakeOutputInterceptor) StartInterceptingOutput ¶
func (interceptor *FakeOutputInterceptor) StartInterceptingOutput()
func (*FakeOutputInterceptor) StartInterceptingOutputAndForwardTo ¶
func (interceptor *FakeOutputInterceptor) StartInterceptingOutputAndForwardTo(w io.Writer)
func (*FakeOutputInterceptor) StopInterceptingAndReturnOutput ¶
func (interceptor *FakeOutputInterceptor) StopInterceptingAndReturnOutput() string
type FakeReporter ¶
type FakeReporter struct { Begin types.Report Will Reports Did Reports End types.Report ProgressReports []types.ProgressReport ReportEntries []types.ReportEntry SpecEvents []types.SpecEvent Failures []types.AdditionalFailure // contains filtered or unexported fields }
func NewFakeReporter ¶
func NewFakeReporter() *FakeReporter
func (*FakeReporter) DidRun ¶
func (r *FakeReporter) DidRun(report types.SpecReport)
func (*FakeReporter) EmitFailure ¶
func (r *FakeReporter) EmitFailure(state types.SpecState, failure types.Failure)
func (*FakeReporter) EmitProgressReport ¶
func (r *FakeReporter) EmitProgressReport(progressReport types.ProgressReport)
func (*FakeReporter) EmitReportEntry ¶
func (r *FakeReporter) EmitReportEntry(reportEntry types.ReportEntry)
func (*FakeReporter) EmitSpecEvent ¶
func (r *FakeReporter) EmitSpecEvent(specEvent types.SpecEvent)
func (*FakeReporter) SuiteDidEnd ¶
func (r *FakeReporter) SuiteDidEnd(report types.Report)
func (*FakeReporter) SuiteWillBegin ¶
func (r *FakeReporter) SuiteWillBegin(report types.Report)
func (*FakeReporter) WillRun ¶
func (r *FakeReporter) WillRun(report types.SpecReport)
type HaveTrackedMatcher ¶
type HaveTrackedMatcher struct {
// contains filtered or unexported fields
}
func (*HaveTrackedMatcher) FailureMessage ¶
func (m *HaveTrackedMatcher) FailureMessage(actual any) string
func (*HaveTrackedMatcher) Match ¶
func (m *HaveTrackedMatcher) Match(actual any) (bool, error)
func (*HaveTrackedMatcher) NegatedFailureMessage ¶
func (m *HaveTrackedMatcher) NegatedFailureMessage(actual any) string
type NFailed ¶
type NFailed int
type NFlaked ¶
type NFlaked int
type NPassed ¶
type NPassed int
type NPending ¶
type NPending int
type NSkipped ¶
type NSkipped int
type NSpecs ¶
type NSpecs int
type NWillRun ¶
type NWillRun int
type NumAttempts ¶
type NumAttempts int
type OmegaMatcherWithDescription ¶
type OmegaMatcherWithDescription struct { OmegaMatcher Description string }
func (OmegaMatcherWithDescription) GomegaString ¶
func (o OmegaMatcherWithDescription) GomegaString() string
type Reports ¶
type Reports []types.SpecReport
func (Reports) Find ¶
func (s Reports) Find(name string) types.SpecReport
func (Reports) FindByFullText ¶
func (s Reports) FindByFullText(text string) types.SpecReport
func (Reports) FindByLeafNodeType ¶
func (s Reports) FindByLeafNodeType(nodeTypes types.NodeType) types.SpecReport
func (Reports) Names ¶
func (Reports) WithLeafNodeType ¶
func (Reports) WithState ¶
type RunTracker ¶
type RunTracker struct {
// contains filtered or unexported fields
}
func NewRunTracker ¶
func NewRunTracker() *RunTracker
func (*RunTracker) C ¶
func (rt *RunTracker) C(text string, callback ...func()) func(args []string, additionalArgs []string)
func (*RunTracker) DataFor ¶
func (rt *RunTracker) DataFor(text string) map[string]any
func (*RunTracker) Reset ¶
func (rt *RunTracker) Reset()
func (*RunTracker) Run ¶
func (rt *RunTracker) Run(text string)
func (*RunTracker) RunWithData ¶
func (rt *RunTracker) RunWithData(text string, kv ...any)
func (*RunTracker) T ¶
func (rt *RunTracker) T(text string, callback ...func()) func()
func (*RunTracker) TSC ¶
func (rt *RunTracker) TSC(text string, callback ...func(internal.SpecContext)) func(internal.SpecContext)
func (*RunTracker) TrackedRuns ¶
func (rt *RunTracker) TrackedRuns() []string
Source Files ¶
docs.go fake_interrupt_handler.go fake_output_interceptor.go fake_reporter.go multiline_helpers.go run_tracker.go set_up_server.go status_code_poller.go
- Version
- v2.23.4 (latest)
- Published
- Apr 6, 2025
- Platform
- linux/amd64
- Imports
- 21 packages
- Last checked
- 16 hours ago –
Tools for package owners.