Add comprehensive test coverage and GitHub Actions CI - #1
Open
jerome-cbmb wants to merge 1 commit into
Open
Conversation
- Add test suites for all pure-logic library modules: - transaction-classifier (19 tests): classification logic, internal transfer detection, CC payment detection, cash flow filtering - financial-analysis (16 tests): spending analysis, category breakdown, merchant aggregation, recurring charge detection - financial-statement (18 tests): statement building, income/expense allocation, subcategory mapping, date range presets - context-builder (13 tests): context string generation, section formatting, limits/truncation - utils (8 tests): cn() tailwind class merging utility - Total: 118 tests (74 new + 44 existing) across 6 test files - Add .github/workflows/ci.yml: runs typecheck, lint, and tests on PR and push to main - Set TZ=UTC in vitest config to avoid timezone-dependent date parsing in financial-statement.ts (generateMonthRange uses new Date() with date-only strings)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What
Adds 118 tests across 6 test files covering all pure-logic library modules, plus a GitHub Actions CI workflow.
Test Coverage Added
financial-metrics.tstransaction-classifier.tsfinancial-analysis.tsfinancial-statement.tscontext-builder.tsutils.tscn()tailwind class merging utilityCI Workflow
.github/workflows/ci.ymlruns on every PR and push to main:npm run typecheck)npm run lint)npm test)Notes
TZ=UTCin vitest config to avoid timezone-dependent date parsing infinancial-statement.ts(generateMonthRangeusesnew Date()with date-only strings which parse as UTC midnight, causing month shifts in non-UTC timezones)