test(lambda-edge): expand handler unit tests for createRequest, createResult, and env bindings#4747
Open
rokasta12 wants to merge 1 commit intohonojs:mainfrom
Open
test(lambda-edge): expand handler unit tests for createRequest, createResult, and env bindings#4747rokasta12 wants to merge 1 commit intohonojs:mainfrom
rokasta12 wants to merge 1 commit intohonojs:mainfrom
Conversation
…eResult, and env bindings
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4747 +/- ##
==========================================
+ Coverage 91.48% 91.50% +0.01%
==========================================
Files 177 177
Lines 11556 11556
Branches 3357 3359 +2
==========================================
+ Hits 10572 10574 +2
+ Misses 983 981 -2
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary
Expands unit test coverage for the Lambda@Edge handler from 5 tests to 33 (28 new). All new tests target untested code paths in
handler.ts.New coverage by area
isContentTypeBinary— 9 additional MIME types viait.each(csv, html+charset, xml variants, octet-stream, pdf, audio, video)createBody— 4 new tests:datastringcreateRequest(tested indirectly viahandle) — 6 new tests:distributionDomainNamewhen host header is absent?when querystring is emptycreateResult(tested indirectly viahandle) — 6 new tests:bodyEncodingfor text contentbodyEncoding: 'base64'for binary contentenv bindings— 4 new tests:Coverage