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

Function TestFallbackConfig

internal/config/config_test.go:134–146  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

132}
133
134func TestFallbackConfig(t *testing.T) {
135 cfg := fallbackConfig()
136 requireKeyWithValue(t, cfg, []string{gitProtocolKey}, "https")
137 requireKeyWithValue(t, cfg, []string{editorKey}, "")
138 requireKeyWithValue(t, cfg, []string{promptKey}, "enabled")
139 requireKeyWithValue(t, cfg, []string{pagerKey}, "")
140 requireKeyWithValue(t, cfg, []string{aliasesKey, "co"}, "pr checkout")
141 requireKeyWithValue(t, cfg, []string{httpUnixSocketKey}, "")
142 requireKeyWithValue(t, cfg, []string{browserKey}, "")
143 requireKeyWithValue(t, cfg, []string{clipboardKey}, "enabled")
144 requireKeyWithValue(t, cfg, []string{colorLabelsKey}, "disabled")
145 requireNoKey(t, cfg, []string{"unknown"})
146}
147
148func TestSetTopLevelKey(t *testing.T) {
149 c := newTestConfig()

Callers

nothing calls this directly

Calls 3

fallbackConfigFunction · 0.85
requireKeyWithValueFunction · 0.70
requireNoKeyFunction · 0.70

Tested by

no test coverage detected