Skip to content

test(mcp): cover startup summary states#393

Closed
ctharvey wants to merge 1 commit intoesengine:mainfrom
ctharvey:test/mcp-startup-summary-states
Closed

test(mcp): cover startup summary states#393
ctharvey wants to merge 1 commit intoesengine:mainfrom
ctharvey:test/mcp-startup-summary-states

Conversation

@ctharvey
Copy link
Copy Markdown
Contributor

@ctharvey ctharvey commented May 7, 2026

Part of #196 — MCP cleanup roadmap item 1.

Adds unit tests for `healthBadge` and `slashHealthBadge` in `mcp-health.ts`, covering all four startup summary states:

  • `elapsedMs === 0` → `"no inspect data"` (pre-inspect / failed-inspect state)
  • `elapsedMs < 500` → `"healthy"`
  • `elapsedMs < 3000` → `"slow"`
  • `elapsedMs >= 3000` → `"very slow"`

Also tests the divergent `=== 0` behavior between `healthBadge` (special-cased) and `slashHealthBadge` (falls through to < 500, producing `"healthy · 0ms"`).

@ctharvey ctharvey closed this May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant