Skip to content

Add Vitest suite for expense split logic - #413

Merged
mergekeeper[bot] merged 1 commit into
mergepay:mainfrom
Godsdar:feat/split-vitest-suite
Aug 29, 2026
Merged

mergekeeper[bot] merged 1 commit into
mergepay:mainfrom
Godsdar:feat/split-vitest-suite

Conversation

@Godsdar

@Godsdar Godsdar commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Adds a Vitest suite for the split helpers in src/lib/split.ts — splitEqual, splitByPercentage, splitByCustom, plus the edge cases of computeSharesAmounts: even splits with remainders, the exact-sum invariant, custom amounts, zero-balance participants, and a 1B XLM precision check.

Put it in src/lib/split.vitest.test.ts rather than tests/split.test.ts, because that path already holds the node:test suite (run via tsx), and the repo's Vitest tests live as *.vitest.test.ts next to the source. 18 tests, all pass via vitest run; typecheck and eslint are clean.

Closes #306

@mergekeeper

mergekeeper Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

MergeKeeper review

Scope: in scope for linked issue #306.
Verdict: clean

The PR successfully adds a comprehensive Vitest unit test suite covering split calculation logic in accordance with issue requirements.

Reviewed commit: 688d5228c5dfd9e6f08572af86c348349fbce9c8.
CI and merge eligibility are checked separately.

@Godsdar
Godsdar force-pushed the feat/split-vitest-suite branch from 1995b05 to e08e42a Compare August 29, 2026 13:42
@Godsdar
Godsdar force-pushed the feat/split-vitest-suite branch from e08e42a to 688d522 Compare August 29, 2026 13:43

@mergekeeper mergekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

The PR successfully adds a comprehensive Vitest unit test suite covering split calculation logic in accordance with issue requirements.

@mergekeeper
mergekeeper Bot merged commit a270218 into mergepay:main Aug 29, 2026
1 check passed
@mergekeeper

mergekeeper Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Merged

Merged with squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add End-to-End Vitest Unit Test Suite for Shared Expense Calculation Logic

1 participant