diff --git a/app/models/Property.test.ts b/app/models/Property.test.ts index 356a6fcf..b87f7b9f 100644 --- a/app/models/Property.test.ts +++ b/app/models/Property.test.ts @@ -24,8 +24,23 @@ it("correctly calculates the newBuildPrice", () => { expect(property.newBuildPrice).toBeCloseTo(186560); }); -it("correctly calculates the depreciatedBuildPrice", () => { - expect(property.depreciatedBuildPrice).toBeCloseTo(110717.45); +it("correctly calculates the depreciatedBuildPrice for existing builds (age > 0)", () => { + expect(property.depreciatedBuildPrice).toBeCloseTo(172988.92); +}); + +it("correctly calculates depreciatedBuildPrice for newbuilds (age = 0)", () => { + property = new Property({ + postcode: "WV8 1HG", + houseType: "T", + numberOfBedrooms: 2, + age: 1, + size: 88, + maintenancePercentage: 0.02, + newBuildPricePerMetre: 2120, + averageMarketPrice: 218091.58, + itl3: "TLG24", + }); + expect(property.depreciatedBuildPrice).toBeCloseTo(186560) }); it("correctly calculates the bedWeightedAveragePrice", () => {