Skip to content

Tests: Split monolithic client-test.js into focused suites #24

@evans-sam

Description

@evans-sam

Problem

test/client-test.js is 91,908 bytes — the largest file in the repo. It tests the entire Client surface in one go: WSDL loading, request encoding, response decoding, headers, faults, streaming, security, etc. Side effects:

  • Hard to navigate or search.
  • --bail on failure means one broken test can mask unrelated issues.
  • LLM-assisted edits and reviews struggle at this file size.
  • Impossible to run a single feature area in isolation.

Why it matters

Test organization compounds with codebase size. The sooner this is split, the cheaper it is.

Proposed approach

Split by feature area, one file per area. Candidates:

  • test/client/lifecycle-test.js — create, destroy, emit
  • test/client/wsdl-loading-test.js — load from URL, file, string
  • test/client/request-encoding-test.js — request body construction
  • test/client/response-decoding-test.js — response body parsing
  • test/client/headers-test.js — SOAP headers, HTTP headers
  • test/client/faults-test.js — SOAP fault handling
  • test/client/streaming-test.js — streaming responses

Preserve every existing assertion. No file should exceed ~15 KB.

Acceptance criteria

  • test/client-test.js no longer exists (or is a thin index).
  • All assertions preserved; npm test passes.
  • No file exceeds ~15 KB.

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtTechnical debt / code qualitytestingTest coverage and quality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions