Testing

Coverage aimed at behavior, not ceremony

The suite is organized around the contracts most likely to regress: transport shaping, config behavior, output guarantees, TUI rendering, and local PDF utilities.

Test layers

  • Config and client: round-trips, redaction, query parameters, HTTP mapping, pagination, uploads, downloads
  • Output and TUI: Markdown shape, JSON envelope shape, TUI rendering, security reviewer behavior
  • CLI behavior: help surface, missing-config paths, graceful status, config set-url/set-token, document content, and pdf read/info

Compatibility coverage

  • document content returns only extracted text in the happy path.
  • Document metadata edits add and remove tags without disturbing unrelated fields.
  • tag edit request shaping stays narrow and predictable.
  • PAPERLESS_URL and PAPERLESS_TOKEN override persisted config correctly.