test(utils): pin validateTeamSplits edge-case contracts - #108
Closed
rudra496 wants to merge 1 commit into
Closed
Conversation
|
@rudra496 is attempting to deploy a commit to the chonilius' projects Team on Vercel. A member of the Team first needs to authorize it. |
The duplicate-declaration build break from MergeFi#68 is already resolved on main (75fea94, ba7cc7b), but the surrounding behaviour was only partly pinned: the empty-array short-circuit asserted the sum without the valid flag, mixed string/number arrays and the tolerance parameter had no coverage, and an unparseable percentage was untested. Adds four tests: empty array is valid with zero sum, mixed percentage types sum correctly, a wide tolerance accepts sums it would otherwise reject, and NaN-producing input stays invalid.
rudra496
force-pushed
the
fix/issue-68-duplicate-export
branch
from
August 26, 2026 10:53
e4e46de to
3442479
Compare
Author
|
Closing this one myself: the underlying duplicate |
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.
Closes #68
Status of the build break
The duplicate
validateTeamSplitsexport that failednext build(TS2393) is already resolved on current main — removed in 75fea94 and repaired in ba7cc7b. Verified on a fresh clone just now:npx tsc --noEmitexits clean andnext buildsucceeds (after copying.env.exampleto.env.local, which the validated-env config requires locally).What this adds
The fix landed without the surrounding behaviour fully pinned, so this PR closes the gap with four tests:
{ valid: true, sum: 0 }— the existing test only asserted the sum, not the short-circuit's valid flagtoleranceactually widens acceptance (60 + 43 rejected at default, accepted at 5)Verification
npx jest src/lib/utils.test.ts— 39/39 passing (34 before).npm run lintandnpm run buildclean. Tests-only diff, no production code touched.