MCPcopy Index your code
hub / github.com/cli/cli / CommandRecorderSpy

Struct CommandRecorderSpy

internal/telemetry/fake.go:20–23  ·  view source on GitHub ↗

CommandRecorderSpy is a test double for ghtelemetry.CommandRecorder. It captures recorded events and the most recent SetSampleRate call so tests can assert on the sampling behavior commands attempt to configure.

Source from the content-addressed store, hash-verified

18// It captures recorded events and the most recent SetSampleRate call so tests can
19// assert on the sampling behavior commands attempt to configure.
20type CommandRecorderSpy struct {
21 Events []ghtelemetry.Event
22 LastSampleRate int
23}
24
25func (r *CommandRecorderSpy) Record(event ghtelemetry.Event) {
26 r.Events = append(r.Events, event)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected