MCPcopy Create free account
hub / github.com/auth0/auth0-cli / TestGenerateRunEventName

Function TestGenerateRunEventName

internal/analytics/analytics_test.go:37–55  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

35}
36
37func TestGenerateRunEventName(t *testing.T) {
38 t.Run("generates from root command", func(t *testing.T) {
39 want := "CLI - Auth0 - Run"
40 got := generateRunEventName("auth0")
41 assert.Equal(t, want, got)
42 })
43
44 t.Run("generates from top-level command", func(t *testing.T) {
45 want := "CLI - Auth0 - Apps - Run"
46 got := generateRunEventName("auth0 apps")
47 assert.Equal(t, want, got)
48 })
49
50 t.Run("generates from subcommand", func(t *testing.T) {
51 want := "CLI - Apps - List - Run"
52 got := generateRunEventName("auth0 apps list")
53 assert.Equal(t, want, got)
54 })
55}
56
57func TestNewEvent(t *testing.T) {
58 t.Run("creates a new event instance", func(t *testing.T) {

Callers

nothing calls this directly

Calls 1

generateRunEventNameFunction · 0.85

Tested by

no test coverage detected