-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
✅ test: add unit tests for packages/const/src/utils/merge #10987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds a comprehensive Vitest unit test suite for the merge utilities in packages/const/src/utils/merge.ts, focusing on correctness, edge cases, and non-mutation behavior for both merge and mergeArrayById. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #10987 +/- ##
========================================
Coverage 80.31% 80.31%
========================================
Files 980 980
Lines 66983 66983
Branches 8780 9151 +371
========================================
Hits 53800 53800
Misses 13183 13183
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Summary
packages/const/src/utils/mergemergeandmergeArrayByIdutility functions with edge cases and error handlingChanges
Module Processed
packages/const/src/utils/merge.tsTest Coverage
Functions Tested:
merge(target, source)- Custom object merge with array replacementmergeArrayById(defaultItems, userItems)- ID-based array merging with metadata preservationCoverage Type:
Unit tests
Test Approach:
Comprehensive test suite covering:
For
mergefunction:For
mergeArrayByIdfunction:All tests use the Arrange-Act-Assert pattern and follow Vitest best practices.
🤖 Generated with Claude Code
Summary by Sourcery
Tests: