MCPcopy Create free account
hub / github.com/cli/cli / stubLookupEnv

Function stubLookupEnv

internal/telemetry/telemetry_test.go:35–39  ·  view source on GitHub ↗
(fn func(string) (string, bool))

Source from the content-addressed store, hash-verified

33}
34
35func stubLookupEnv(fn func(string) (string, bool)) func() {
36 orig := lookupEnvFunc
37 lookupEnvFunc = fn
38 return func() { lookupEnvFunc = orig }
39}
40
41func TestGetOrCreateDeviceID(t *testing.T) {
42 t.Run("creates new ID on first call", func(t *testing.T) {

Callers 1

TestParseTelemetryStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected