Conversation
- Fix same_keys? test to exercise correct code path
- Split "list containing non-maps" into two cases:
- List starting with non-map (exercises fallback clause)
- List with map followed by non-maps (exercises Enum.all? logic)
- Add nested path key_order test for Objects.encode
- Verifies path-specific key ordering for nested objects
- Exercises the Map.fetch(key_order, path) logic
Addresses semantic quality issues found during code review.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Pull Request Test Coverage Report for Build 126c2cb4bbfb9d12c7904d51deb2e9b1ad6b6a99-PR-13Details
💛 - Coveralls |
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
Fixes semantic issues in tests identified during code review:
same_keys?/1 test - The original test for "list containing non-maps" only exercised the fallback clause, not the
Enum.all?logic that checksis_map(map)inside the iteration.Objects.encode nested key_order - Added missing test for nested path-specific key ordering.
Changes
utils_test.exs
"returns false for list starting with non-map"- exercisesdef same_keys?(_), do: false"returns false for list with map followed by non-maps"- exercises theEnum.all?withis_mapcheckobjects_test.exs
"uses nested path key_order for nested objects"- verifiesMap.fetch(key_order, path)logic for nested objectsTest plan
🤖 Generated with Claude Code