Skip to content

Fix/1063 revenue reports coverage - #1231

Merged
thlpkee20-wq merged 3 commits into
RevoraOrg:masterfrom
Peolite001:fix/1063-revenue-reports-coverage
Sep 29, 2026
Merged

thlpkee20-wq merged 3 commits into
RevoraOrg:masterfrom
Peolite001:fix/1063-revenue-reports-coverage

Conversation

@Peolite001

Copy link
Copy Markdown
Contributor

Add regression coverage for RevenueReport failure handling

Closes #1063

Description

This PR addresses the lack of regression coverage for explicit failure and empty-result paths within the RevenueReport endpoint (src/offerings/revenueReportsRoute.ts).

Previously, query parameters such as page, pageSize, periodFrom, and periodTo had logic paths for rejecting invalid shapes (e.g., arrays or undefined types), but they were not properly covered by our test suite. Without regression coverage, changes to this public contract could cause silent behavior modifications.

Changes Made

  • Introduced automated test coverage in src/offerings/revenueReportsRoute.test.ts for boundary handling and invalid parameter inputs.
  • Validated that array injection attempts into query parameters (e.g., page=1&page=2) accurately trigger observable 400 Bad Request or fall back correctly, preventing downstream runtime crashes.
  • Maintained the existing public API contract with no functional changes—solely expanding test validation to lock down the expected deterministic behavior.

Exercised Cases & Results

The test suite has been successfully run, including the following specific failure and success boundaries:

  1. returns 400 when page is an array - PASS
  2. returns 400 when pageSize is an array - PASS
  3. ignores period parameters when they are arrays - PASS
  4. uses default pagination when page and pageSize are undefined - PASS
  5. returns 400 for invalid period range - PASS

Validation

  • Run the focused test file (npm run test src/offerings/revenueReportsRoute.test.ts) and the surrounding suite.
  • Run the repository's configured lint, type, and build checks.
  • Assured tests are deterministic and assert directly on the returned value/error contract.

@drips-wave

drips-wave Bot commented Sep 29, 2026

Copy link
Copy Markdown

@Peolite001 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@thlpkee20-wq
thlpkee20-wq merged commit b40abb4 into RevoraOrg:master Sep 29, 2026
1 check passed
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 regression coverage for RevenueReport failure handling

2 participants