test: close tea and error-classifier coverage gaps, raise thresholds
All checks were successful
CI / test (pull_request) Successful in 53s
CI / test (push) Successful in 21s

Cover the previously untested credential and error-classification paths:
- tea.ts: failing/invalid/non-array `tea login list`, a failing token
  helper, and an empty token, all driven through the CLI seam via the fake
  tea harness (now parametrizable for exit codes and output).
- errors.ts: a unit-tier test of classifyHttpError for the pure-classifier
  branches no shipped command reaches yet (issue/pull 404s, the
  already-classified passthrough, transport failures, no-body defaults).

errors.ts is now fully covered and tea.ts is at 96% (the remainder is
defensive code unreachable through the seam). Overall coverage rose from
~87% to ~93% statements / ~89% branches; the ratchet is raised to
92/87/95/92 accordingly.
This commit was merged in pull request #1.
This commit is contained in:
2026-07-11 09:15:15 -04:00
parent 94e81966be
commit ae0f4c2675
3 changed files with 226 additions and 11 deletions

View File

@@ -23,10 +23,10 @@ export default defineConfig({
// coverage so a real drop fails CI while trivial churn does not. Raise
// these as coverage climbs; never lower them to make a red build pass.
thresholds: {
statements: 85,
branches: 78,
functions: 90,
lines: 85,
statements: 92,
branches: 87,
functions: 95,
lines: 92,
},
},
},