- Env key to be more generic
- Cache directory to .cache
- Multiply bank amount by 100 to get correct conversion rate

Removed:
- Unused functions in Actual.ts

Added:
- Test for main functionality
- BankStub for testing
- Added imported_id to Actual Transaction to avoid duplicates
This commit is contained in:
2024-12-01 20:48:42 +01:00
parent cc325b9f08
commit 9ed0a19393
9 changed files with 88 additions and 50 deletions

12
tests/main.test.ts Normal file
View File

@ -0,0 +1,12 @@
import { describe, it } from "node:test"
import { daily } from "@/main.ts"
import { ActualImpl } from "@/actual.ts"
import { BankStub } from "./stubs/bankStub.ts"
import assert from "node:assert"
describe("Main logic of the application", () => {
it("should import the transactions to Actual Budget", async () => {
await daily(await ActualImpl.init(), new BankStub())
assert.ok(true)
})
})