-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: calculate totalInterest
in Mortgage class
#119
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
so fairholdLandPurchase and fairholdLandRent now take marketPurchase
If we merge #123 into this branch first, it should resolve the test issue above! |
app/models/Mortgage.ts
Outdated
@@ -110,4 +112,9 @@ export class Mortgage { | |||
|
|||
return yearlyPaymentBreakdown; | |||
} | |||
private calculateTotalInterest() { | |||
const totalInterest = parseFloat((this.principal * this.interestRate * this.termYears).toFixed(2)) | |||
console.log("Total interest: ", totalInterest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Leftover console.log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks!
…tests fix: update tests following interest calculation functionality
What does this PR do?
Mortgage
class)NB: There's another instance of
principal
that will also need fixing once #117 is merged.Closes #118