MCPcopy Create free account
hub / github.com/github/gh-aw / TestPromptSecretInput

Function TestPromptSecretInput

pkg/console/input_test.go:12–28  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestPromptSecretInput(t *testing.T) {
13 t.Run("function signature", func(t *testing.T) {
14 // Verify the function exists and has the right signature
15 _ = PromptSecretInput
16 })
17
18 t.Run("validates parameters", func(t *testing.T) {
19 title := "Enter Secret"
20 description := "Secret value will be masked"
21
22 // Function exists and parameters are accepted
23 _, err := PromptSecretInput(title, description)
24 // Will error in test environment (no TTY), but that's expected
25 require.Error(t, err, "Should error when not in TTY")
26 assert.Contains(t, err.Error(), "not a TTY", "Error should mention TTY")
27 })
28}

Callers

nothing calls this directly

Calls 3

PromptSecretInputFunction · 0.70
RunMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected