MCPcopy Create free account
hub / github.com/algolia/cli / TestTelemetryEnv

Function TestTelemetryEnv

pkg/telemetry/telemetry_test.go:42–51  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

40}
41
42func TestTelemetryEnv(t *testing.T) {
43 orig := version.Version
44 t.Cleanup(func() { version.Version = orig })
45
46 version.Version = "main"
47 assert.Equal(t, "dev", telemetryEnv())
48
49 version.Version = "1.20.0"
50 assert.Equal(t, "prod", telemetryEnv())
51}
52
53// Context-related tests.
54func TestEventMetadataWithGet(t *testing.T) {

Callers

nothing calls this directly

Calls 1

telemetryEnvFunction · 0.85

Tested by

no test coverage detected