From b64cefdd67a4d6a90177ca56c22e3b4132aff02b Mon Sep 17 00:00:00 2001 From: zzhhaa Date: Fri, 22 Nov 2024 11:27:18 +0000 Subject: [PATCH] chore: update tests following new fh formula --- app/models/Fairhold.test.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/models/Fairhold.test.ts b/app/models/Fairhold.test.ts index 0a2ead63..79e9f220 100644 --- a/app/models/Fairhold.test.ts +++ b/app/models/Fairhold.test.ts @@ -10,19 +10,18 @@ it("can be instantiated", () => { it("correctly calculates the fairhold formula below the threshold", () => { const fairhold = new Fairhold({ - affordability: 0.05, + affordability: 0.15, landPriceOrRent: 100, }); - expect(fairhold.discountLand).toBeCloseTo(0.6877641290737884); + expect(fairhold.discountLand).toBeCloseTo(0.535); }); it("correctly calculates the fairhold formula above the threshold", () => { const fairhold = new Fairhold({ - affordability: 0.05, + affordability: 0.5, landPriceOrRent: 100, - plateau: 3, }); - expect(fairhold.discountLand).toBeCloseTo(0.68776); + expect(fairhold.discountLand).toBeCloseTo(0.15); }); it("correctly deals with negative values of landPriceOrRent", () => {