Skip to content

test: increase test coverage#8

Merged
andreafassina merged 1 commit into
add-nativery-bid-adapterfrom
ndm/increase_test_coverage
Sep 10, 2025
Merged

test: increase test coverage#8
andreafassina merged 1 commit into
add-nativery-bid-adapterfrom
ndm/increase_test_coverage

Conversation

@nicoladellamorte
Copy link
Copy Markdown

About this pull request

We’ve added supplemental JSON tests for the error in getNativeryExt (e.g. widgetId of the wrong type) and also extended coverage with additional cases in MakeBids (204 with/without X-Nativery-Error, malformed bid.ext, bad response JSON, etc.).

For the other two error branches (getRequestExt and the first unmarshal in buildNativeryExt), these are not reachable with the supplemental JSON harness: the loader rejects any request.ext or imp.ext that is not a JSON object before it even reaches the adapter, so the errors cannot be triggered that way. Those paths are only hit if Prebid-server were fed invalidly shaped JSON at runtime, which the framework prevents.

So coverage is now above 90%, and all error paths that can be reached via the supplemental tests are exercised. The remaining uncovered lines are structurally unreachable via the harness, not due to missing tests.

@andreafassina andreafassina merged commit fded54c into add-nativery-bid-adapter Sep 10, 2025
1 check failed
@andreafassina andreafassina deleted the ndm/increase_test_coverage branch September 10, 2025 14:21
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.

2 participants