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

Function TestCopilotCommandIsSampledAt100

pkg/cmd/copilot/copilot_test.go:619–633  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

617}
618
619func TestCopilotCommandIsSampledAt100(t *testing.T) {
620 spy := &telemetry.CommandRecorderSpy{}
621 factory := &cmdutil.Factory{}
622 cmd := NewCmdCopilot(factory, spy, func(opts *CopilotOptions) error {
623 return nil
624 })
625 cmd.SetArgs([]string{})
626 cmd.SetIn(&bytes.Buffer{})
627 cmd.SetOut(&bytes.Buffer{})
628 cmd.SetErr(&bytes.Buffer{})
629
630 _, err := cmd.ExecuteC()
631 require.NoError(t, err)
632 require.Equal(t, ghtelemetry.SAMPLE_ALL, spy.LastSampleRate)
633}

Callers

nothing calls this directly

Calls 2

NewCmdCopilotFunction · 0.85
EqualMethod · 0.80

Tested by

no test coverage detected