[PR #1991] [MERGED] Add some initial api tests for budgets and accounts #11113

Closed
opened 2026-04-10 20:51:58 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/1991
Author: @twk3
Created: 11/28/2023
Status: Merged
Merged: 12/2/2023
Merged by: @MatissJanis

Base: masterHead: initial-api-tests


📝 Commits (5)

  • d54f227 Add some initial api tests for budgets and accounts
  • 062f86f Address feedback
  • 2ba235c Ensure test --watch doesn't loop
  • f03fe5c Remove unneeded index.testing.js change
  • 865fc62 Ensure the api bundle is build prior to running test

📊 Changes

9 files changed (+209 additions, -3 deletions)

View changed files

📝 packages/api/.gitignore (+1 -0)
packages/api/__snapshots__/methods.test.ts.snap (+21 -0)
📝 packages/api/index.js (+0 -2)
packages/api/jest.config.js (+24 -0)
packages/api/methods.test.ts (+147 -0)
packages/api/mocks/budgets/.gitkeep (+0 -0)
📝 packages/api/package.json (+6 -1)
upcoming-release-notes/1991.md (+6 -0)
📝 yarn.lock (+4 -0)

📄 Description

  • Adds jest config for the api package
  • Reuse setup from loot-core, as we are loading it's server/main anyways
  • Cover some basic budget and account tests to prove it out

The test setup is based on what was done for server/main.test.ts (and reuses it's mock databaseFiles)

Part of https://github.com/actualbudget/actual/issues/1074


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/1991 **Author:** [@twk3](https://github.com/twk3) **Created:** 11/28/2023 **Status:** ✅ Merged **Merged:** 12/2/2023 **Merged by:** [@MatissJanis](https://github.com/MatissJanis) **Base:** `master` ← **Head:** `initial-api-tests` --- ### 📝 Commits (5) - [`d54f227`](https://github.com/actualbudget/actual/commit/d54f227bfb54e11d204d2e93791c0424b1589d78) Add some initial api tests for budgets and accounts - [`062f86f`](https://github.com/actualbudget/actual/commit/062f86f923aad8b9b8789681c9ab62410ff1c2b0) Address feedback - [`2ba235c`](https://github.com/actualbudget/actual/commit/2ba235c13fd4c3b931b787a7419bdce7254c9763) Ensure test --watch doesn't loop - [`f03fe5c`](https://github.com/actualbudget/actual/commit/f03fe5ceaf6c70dc6b18ec58d7b462968ad6669d) Remove unneeded index.testing.js change - [`865fc62`](https://github.com/actualbudget/actual/commit/865fc62f1bb94e26edf131d1e51e33eea9c7a14c) Ensure the api bundle is build prior to running test ### 📊 Changes **9 files changed** (+209 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/api/.gitignore` (+1 -0) ➕ `packages/api/__snapshots__/methods.test.ts.snap` (+21 -0) 📝 `packages/api/index.js` (+0 -2) ➕ `packages/api/jest.config.js` (+24 -0) ➕ `packages/api/methods.test.ts` (+147 -0) ➕ `packages/api/mocks/budgets/.gitkeep` (+0 -0) 📝 `packages/api/package.json` (+6 -1) ➕ `upcoming-release-notes/1991.md` (+6 -0) 📝 `yarn.lock` (+4 -0) </details> ### 📄 Description - Adds jest config for the api package - Reuse setup from loot-core, as we are loading it's server/main anyways - Cover some basic budget and account tests to prove it out The test setup is based on what was done for server/main.test.ts (and reuses it's mock databaseFiles) Part of https://github.com/actualbudget/actual/issues/1074 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-10 20:51:58 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#11113