(t *testing.T)
| 31 | } |
| 32 | |
| 33 | func TestGettingStarted_RegisteredOnRoot(t *testing.T) { |
| 34 | t.Parallel() |
| 35 | |
| 36 | cmd, _, err := NewRootCmd().Find([]string{"getting-started"}) |
| 37 | require.NoError(t, err) |
| 38 | assert.Equal(t, "getting-started", cmd.Name()) |
| 39 | assert.Contains(t, cmd.Aliases, "tour") |
| 40 | |
| 41 | // The alias resolves to the same command. |
| 42 | viaAlias, _, err := NewRootCmd().Find([]string{"tour"}) |
| 43 | require.NoError(t, err) |
| 44 | assert.Equal(t, "getting-started", viaAlias.Name()) |
| 45 | } |
nothing calls this directly
no test coverage detected