feat: refine month totals and recurring purchase entry
This commit is contained in:
1 parent
7cccd7a41a
commit
c250bbe476
30 files changed
+634
-67
No files matched your search
@@ -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, {
|
||||
|
||||
Reference in new issue
Block a user