Cursor Agent 00ee079696 [AI] Add comprehensive integration tests for formula rules and formula cards
User requested integration tests with real database queries and complex nested formulas.
These tests go beyond unit testing HyperFormula to validate the full integration with
Actual's transaction rules and query system.

Formula Rule Integration Tests (36 tests):
- Basic formula operations with FORMATCURRENCY and nested IFs
- Text manipulation: CONCATENATE, UPPER, LEFT, RIGHT, TRIM, PROPER
- Math functions: ROUND, ABS, MAX, MIN, CEILING, SQRT, SUM, PRODUCT
- Date functions: YEAR, MONTH, DAY, DAYS, EOMONTH, WEEKDAY
- Logical functions: AND, OR, NOT, IFERROR, SWITCH
- New formatting functions: FORMATNUMBER, FORMATCURRENCY with various options
- Multi-line output with CHAR(10) for line breaks
- Information functions: ISNUMBER, ISTEXT, ISEVEN, ISODD, ISBLANK
- Error handling and validation
- Complex nested formulas combining multiple function types

Formula Card Integration Tests (14 tests):
- Single and multiple query integration
- Query results with FORMATCURRENCY and FORMATNUMBER
- Percentage calculations across queries
- Date-based query filtering
- Complex nested calculations with multiple queries
- Multi-line output with query results
- Error handling with empty queries and division by zero
- Running totals across accounts
- MAX/MIN operations with query results

Test Coverage:
- Every formula function type is tested in at least one integration test
- Tests use real database operations (insertAccount, insertPayee, insertCategory, etc.)
- Tests validate complex nested formulas with 3-4 levels of nesting
- Tests cover edge cases (empty results, division by zero, type mismatches)
- All 50 integration tests pass 

Note: Tests demonstrate proper usage patterns for users:
- Transaction amounts are in cents, divide by 100 for dollar display
- Rules must have conditions on 'imported_payee' or 'payee' to be indexed
- Query results are automatically converted from cents to dollars
- FORMATCURRENCY places negative sign before currency symbol (standard format)

Co-authored-by: lelemm <lelemm@users.noreply.github.com>
2026-04-30 02:44:51 +00:00

Actualbudget

Getting Started

Actual is a local-first personal finance tool. It is 100% free and open-source, written in NodeJS, it has a synchronization element so that all your changes can move between devices without any heavy lifting.

If you are interested in contributing, or want to know how development works, see our contributing document we would love to have you.

Want to say thanks? Click the at the top of the page.

Installation

There are four ways to deploy Actual:

  1. One-click deployment via PikaPods (~1.40 $/month) - recommended for non-technical users
  2. Managed hosting via Fly.io (~1.50 $/month)
  3. Self-hosted by using a Docker image
  4. Local-only apps - downloadable Windows, Mac and Linux apps you can run on your device

Learn more in the installation instructions docs.

Ready to Start Budgeting?

Read about Envelope budgeting to know more about the idea behind Actual Budget.

Are you new to budgeting or want to start fresh?

Check out the community's Starting Fresh guide so you can quickly get up and running!

Are you migrating from other budgeting apps?

Check out the community's Migration guide to start jumping on the Actual Budget train!

Documentation

We have a wide range of documentation on how to use Actual, this is all available in our Community Documentation, this includes topics on Budgeting, Account Management, Tips & Tricks and some documentation for developers.

Contributing

Actual is a community driven product. Learn more about contributing to Actual.

Code structure

The Actual app is split up into a few packages:

  • loot-core - The core application that runs on any platform
  • desktop-client - The desktop UI
  • desktop-electron - The desktop app

More information on the project structure is available in our community documentation.

Feature Requests

Current feature requests can be seen here. Vote for your favorite requests by reacting 👍 to the top comment of the request.

To add new feature requests, open a new Issue of the "Feature Request" type.

Translation

Make Actual Budget accessible to more people by helping with the Internationalization of Actual. We are using a crowd sourcing tool to manage the translations, see our Weblate Project. Weblate proudly supports open-source software projects through their Libre plan.

Translation status

Repo Activity

Alt

Sponsors

Thanks to our wonderful sponsors who make Actual Budget possible!

Deploys by Netlify

Description
No description provided
Readme 1 GiB
Latest
2026-04-05 12:12:51 -05:00
Languages
TypeScript 91.2%
JavaScript 8.3%
Shell 0.1%