test: add 178 tests for credential display, auth parsing, and internal helpers (#1063)

Adds comprehensive test coverage for previously untested or weakly tested
areas in commands.ts and index.ts:

- formatCredStatusLine: newly exported function with zero prior tests
- formatAuthVarLine (replicated): private helper for quick-start display
- groupByType (replicated): private helper for clouds/agents grouping
- formatCacheAge (replicated): version display cache age formatting
- parseAuthEnvVars: 14 edge cases (CloudSigma format, short strings, hyphens)
- hasCloudCredentials: 8 edge cases (empty values, multiple vars, none auth)
- getImplementedClouds/getImplementedAgents: nonexistent/empty manifest cases
- getMissingClouds: all/none/empty scenarios
- calculateColumnWidth: boundary and empty array cases
- prioritizeCloudsByCredentials/buildAgentPickerHints: empty/orphan agents
- resolveDisplayName: null manifest, unknown keys
- buildRecordLabel/buildRecordHint: null manifest, long prompts
- formatRelativeTime/formatTimestamp: all time buckets + invalid input
- getErrorMessage: null, undefined, boolean, object-without-message
- levenshtein: empty strings, symmetry, insertions/deletions
- findClosestMatch/findClosestKeyByNameOrKey: empty candidates, case sensitivity
- resolveAgentKey/resolveCloudKey: display name resolution, empty string
- checkEntity: swapped kind detection (agent as cloud, cloud as agent)
- getStatusDescription: 404 vs other HTTP codes
- isRetryableExitCode: all exit codes including empty/signal messages
- buildRetryCommand: prompt length boundary (80 vs 81 chars), quote escaping
- credentialHints: all-set, missing, custom verb
- getSignalGuidance: all signals + dashboard URL
- getScriptFailureGuidance: all exit codes + null + dashboard

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
A 2026-02-13 22:49:41 -08:00 committed by GitHub
parent 5b0358bcd1
commit 04e92fe727
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

File diff suppressed because it is too large Load diff