Fix/1063 revenue reports coverage - #1231
Merged
thlpkee20-wq merged 3 commits intoSep 29, 2026
Merged
Conversation
|
@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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
RevenueReportendpoint (src/offerings/revenueReportsRoute.ts).Previously, query parameters such as
page,pageSize,periodFrom, andperiodTohad 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
src/offerings/revenueReportsRoute.test.tsfor boundary handling and invalid parameter inputs.page=1&page=2) accurately trigger observable400 Bad Requestor fall back correctly, preventing downstream runtime crashes.Exercised Cases & Results
The test suite has been successfully run, including the following specific failure and success boundaries:
returns 400 when page is an array- PASSreturns 400 when pageSize is an array- PASSignores period parameters when they are arrays- PASSuses default pagination when page and pageSize are undefined- PASSreturns 400 for invalid period range- PASSValidation
npm run test src/offerings/revenueReportsRoute.test.ts) and the surrounding suite.