feat: add guarded savings agent tools

This commit is contained in:
Matthias
2026-06-23 21:13:02 +02:00
parent 6e687dc9b5
commit b7dae31fe1
22 changed files with 3510 additions and 73 deletions

View File

@@ -0,0 +1,34 @@
import { describe, expect, test } from "vitest";
import { mapComdirectBalances } from "./comdirectProvider";
describe("mapComdirectBalances", () => {
test("normalizes comdirect balance payloads into provider balances", () => {
const result = mapComdirectBalances({
values: [
{
account: {
accountId: "account-1",
iban: "DE89370400440532013000",
accountType: { text: "Girokonto" },
},
balance: { value: "1234.56", unit: "EUR" },
date: "2026-06-23",
},
{
account: {},
balance: { value: "999" },
},
],
});
expect(result).toEqual([
{
externalId: "account-1",
balance: 1234.56,
currency: "EUR",
asOf: "2026-06-23",
},
]);
});
});