Skip to content

Audit: direct test coverage for every public export of the Node adapter #31

Description

@smiggleworth

Purpose

Audit task, not a bug report — produces a coverage table, doesn't fix anything.

Procedure

  1. Enumerate every named export from the package's public entrypoints.
  2. For each, find test file(s) calling it directly.
  3. File a gap issue (or add a trivial test) where none exists.

Definition of Done

  • Table: export | source file | direct test file(s) | ✅/🔗.
  • Every export from every public entrypoint has a row.
  • No row left unmarked.

Audit results (2026-08-24)

Public export Source Direct test evidence Result
CLIENT_ADDRESS_HEADER src/client-address.ts tests/node.test.ts client-address normalization/spoofing tests
normalizeClientAddress src/client-address.ts tests/node.test.ts normalization test
NodeWebSocketOptions src/contracts.ts WebSocket option tests and typecheck
NodeHandlerOptions src/contracts.ts handler host/base URL tests and typecheck
ListenOptions src/contracts.ts bind, timeout, signal, and WebSocket tests
ServeOptions src/contracts.ts static assets, exclude, signals, shutdown tests
ServedApplication src/contracts.ts serve() lifecycle tests
ConnectNext src/contracts.ts Connect next/throw/fallback tests
NodeHandler src/contracts.ts createNodeHandler() transport tests
createNodeHandler src/handler.ts request translation, error, disconnect tests
ListeningServer src/listen.ts listen() binding/lifecycle tests and typecheck
listen src/listen.ts real-socket conformance, bind, timeout, signal tests
serve src/serve.ts static, caching, WebSocket, shutdown tests
McpStdioOptions src/mcp.ts tests/mcp.test.ts option matrix and typecheck
McpStdioConnection src/mcp.ts MCP close/closed lifecycle tests
connectMcpStdio src/mcp.ts all tests/mcp.test.ts cases

The built declaration entrypoints (dist/index.d.ts, dist/mcp.d.ts) contain no other exports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions