feat: refine month totals and recurring purchase entry
Continuous Integration / lint-and-test (push) Successful in 29s
Continuous Integration / docker-build-and-push (push) Successful in 40s

This commit is contained in:
Lucas Winther committed 2026-10-03 16:40:00 +02:00
1 parent 7cccd7a41a
commit c250bbe476
30 files changed
+634 -67

No files matched your search

+12
View File
@@ -54,6 +54,18 @@ describe("round trip", () => {
});
describe("validation", () => {
test.each(["true", 1, null])("rejects a non-boolean existing-bill entry preference: %s", value => {
const data = populated();
(data.settings as any).allowExistingRecurringCost = value;
expect(() => parseDatasetJson(exportDatasetJson(data))).toThrow(ImportValidationError);
});
test.each([true, false, undefined])("round trips the existing-bill entry preference: %s", value => {
const data = populated();
data.settings.allowExistingRecurringCost = value;
expect(parseDatasetJson(exportDatasetJson(data)).settings.allowExistingRecurringCost).toBe(value);
});
test("accepts an unassigned recurring cost and its unassigned charge", () => {
const data = populated();
const cost = addRecurringCost(data, {