Skip to content

test: cover usage rollups and exports#241

Open
pq198363-ops wants to merge 1 commit into
Agentpay-Org:mainfrom
pq198363-ops:bounty-46-usage-rollups-exports
Open

test: cover usage rollups and exports#241
pq198363-ops wants to merge 1 commit into
Agentpay-Org:mainfrom
pq198363-ops:bounty-46-usage-rollups-exports

Conversation

@pq198363-ops

Copy link
Copy Markdown

Summary

  • adds dedicated src/aggregations.test.ts coverage for usage rollups and export endpoints
  • seeds multiple agents and services, then verifies agent totals, per-agent usage, service totals, service consumers, and top-agent ordering
  • covers top-agent limit clamping, empty agent/service rollups, CSV comma/quote/newline escaping, the CSV header row, and JSON exportedAt plus all (agent, serviceId, total) tuples

Verification

  • npx prettier --check src/aggregations.test.ts
  • npm run lint
  • git diff --check
  • clean dist/, npm run build, $env:NODE_ENV='test'; node --test dist/*.test.js dist/**/*.test.js

Full test output summary:

  • tests: 92
  • suites: 11
  • pass: 92
  • fail: 0

Closes #46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add test coverage for usage rollups, agent aggregations, and CSV/JSON exports

1 participant