Skip to content

[node-sdk] Expand integration test coverage #12

Description

@KayleeWilliams

Why

packages/node-sdk is 2,847 src LOC vs 495 test LOC (~17%). This is the SDK customers actually import - an untested public API erodes trust on first bug and makes every refactor risky.

Scope

  • One contract test per endpoint (intake, init, status, requests, verification, subjects, appeals, artifact delivery, notifications, webhooks, audit, fulfillment, extensions, policies)
  • Error envelope shape tests for each error code
  • Timeout behavior (slow endpoint, no response, network error)
  • Retry behavior (if the SDK retries - document and test; if not, document that)
  • Malformed response handling (non-JSON, truncated, unexpected shape)
  • 4xx and 5xx paths return typed errors
  • Target: ~40% test LOC ratio

Priority: P1 - beta blocker

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions