final touches for beta skymoney (at least i think)
This commit is contained in:
@@ -3,7 +3,7 @@ import { previewAllocation, type FixedPlan, type VariableCategory } from "../src
|
||||
|
||||
const cats = (defs: Array<Partial<VariableCategory> & { name: string }>): VariableCategory[] =>
|
||||
defs.map((d, i) => ({
|
||||
id: i + 1,
|
||||
id: String(i + 1),
|
||||
name: d.name,
|
||||
percent: d.percent ?? 0,
|
||||
isSavings: d.isSavings ?? false,
|
||||
@@ -12,12 +12,13 @@ const cats = (defs: Array<Partial<VariableCategory> & { name: string }>): Variab
|
||||
|
||||
const plans = (defs: Array<Partial<FixedPlan> & { name: string; totalCents: number }>): FixedPlan[] =>
|
||||
defs.map((d, i) => ({
|
||||
id: i + 1,
|
||||
id: String(i + 1),
|
||||
name: d.name,
|
||||
totalCents: d.totalCents,
|
||||
fundedCents: d.fundedCents ?? 0,
|
||||
priority: d.priority ?? 100,
|
||||
dueOn: d.dueOn ?? new Date().toISOString(),
|
||||
cycleStart: d.cycleStart ?? new Date().toISOString(),
|
||||
}));
|
||||
|
||||
describe("previewAllocation — basics", () => {
|
||||
|
||||
Reference in New Issue
Block a user