test: add coverage for utility modules#718
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
bec8444 to
d1d0595
Compare
d1d0595 to
b502f1f
Compare
b502f1f to
d430e61
Compare
avivkeller
left a comment
There was a problem hiding this comment.
Are you an AI agent? While your implementation is fine, I feel like I'm interacting with a robot.
d430e61 to
8798d90
Compare
I use cursor as my editor, it helps me a lot to do such work 😄 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #718 +/- ##
==========================================
+ Coverage 76.15% 76.37% +0.22%
==========================================
Files 151 155 +4
Lines 13641 13766 +125
Branches 1066 1093 +27
==========================================
+ Hits 10388 10514 +126
+ Misses 3248 3247 -1
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@wilsonwangdev can you rebase? |
Add tests for enforceArray, withExt, lazy, isPlainObject, deepMerge, and populate — all previously untested pure utility functions.
- Simplify enforceArray tests to two cases (array vs non-array) - Remove redundant multiple-substitutions test for populate
bd63aa7 to
d6cafc6
Compare
I have rebased to the latest main. Need I squash the two commits into one too? |
|
Nope, the merge will handle that. Thanks for the rebase! |
Description
Add unit tests for 4 previously untested pure utility modules:
src/utils/array.mjs—enforceArray()(4 tests)src/utils/file.mjs—withExt()(4 tests)src/utils/misc.mjs—lazy(),isPlainObject(),deepMerge()(7 tests)src/utils/configuration/templates.mjs—populate()(4 tests)All 19 new tests follow existing conventions (
node:assert/strict,describe/it, co-located__tests__/directories).Validation
Check List
node --run testand all tests passed.node --run format&node --run lint.