Skip to content

TESTING SUMMARY

Doug Fennell edited this page Sep 30, 2025 · 1 revision

Testing Summary (Wiki)

CI

This page provides a practical, curated testing summary for RDCP SDK users. For the full, detailed test implementation guide, see the repository’s TESTING-SUMMARY.md.

Quick Commands

# Run all tests
npm test

# Run in watch mode
npm run test:watch

# Run coverage
npm run test:coverage

# Run a specific test file
npm test -- tests/validation.test.js

# Filter by test name
npm test -- -t "controlRequestSchema"

CI

  • GitHub Actions CI runs on PRs and main, across Node 18.x and 20.x
  • Includes build, tests, lint, and drift checks (error codes doc)

What’s Covered

  • Authentication flows (Basic, Standard/JWT, Enterprise/mTLS)
  • Protocol endpoints: discovery, control, status, health
  • Strict validation (timestamps, durations, categories, error codes)
  • Client SDK behavior and error handling
  • Framework adapters: Express, Fastify, Koa
  • E2E flows via demo app (TTL, rate limiting, audit trail)

Tips

  • Prefer safeParse for soft validation; parse for throwing on invalid input
  • Build artifacts are not committed; drift checks compare generated docs only
  • Keep test files under 300 lines (WARP guideline)

For full details and latest updates, consult the repository’s TESTING-SUMMARY.md.

Clone this wiki locally