- Added Actual account ids and log level to .env.example. - Fixed timestamp error by downloading the budget after init. - Hardcoded date in test. - Separate logging file for configurations. - Organized test - More logging in main - Fixed wrong paths for some files - Load a .env.test.local file when running tests Signed-off-by: Martin Berg Alstad <git@martials.no>
17 lines
487 B
TypeScript
17 lines
487 B
TypeScript
import { describe, it } from "@jest/globals"
|
|
|
|
import { daily } from "@/main.ts"
|
|
import { ActualImpl } from "@/actual.ts"
|
|
import { BankStub } from "./stubs/bankStub.ts"
|
|
|
|
// TODO testcontainers with Actual?
|
|
// TODO tests don't stop after completing
|
|
|
|
describe("Main logic of the application", () => {
|
|
it("should import the transactions to Actual Budget", async () => {
|
|
const actual = await ActualImpl.init()
|
|
await daily(actual, new BankStub())
|
|
await actual.shutdown()
|
|
})
|
|
})
|