From 246930479a5a01d1110836d40dd2ed0f48d60986 Mon Sep 17 00:00:00 2001 From: Nicholas Piperni <36056036+npiperni@users.noreply.github.com> Date: Wed, 10 Apr 2024 14:28:25 -0400 Subject: [PATCH] fix text not compiling --- .../budget-report/budget-report.component.spec.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/app/pages/building-info/budget-report/budget-report.component.spec.ts b/src/app/pages/building-info/budget-report/budget-report.component.spec.ts index 9138f651..ccbd9078 100644 --- a/src/app/pages/building-info/budget-report/budget-report.component.spec.ts +++ b/src/app/pages/building-info/budget-report/budget-report.component.spec.ts @@ -4,7 +4,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BudgetReportComponent } from './budget-report.component'; import { Building, CondoStatus, CondoType, Operation } from 'src/app/models/properties'; -describe('BudgetReportComponent', () => { +fdescribe('BudgetReportComponent', () => { let component: BudgetReportComponent; let fixture: ComponentFixture; @@ -38,9 +38,10 @@ describe('BudgetReportComponent', () => { Facilities: [], Operations: [ { - name: 'Operation 1', - description: 'Description of Operation 1', - cost: 500, + ID: '1', + Name: 'Operation 1', + Description: 'Description of Operation 1', + Cost: 500, }, ], }; @@ -110,7 +111,7 @@ describe('BudgetReportComponent', () => { it('should calculate total operation costs correctly', () => { const totalOperationCosts = component.totalOperationCosts; - const expectedTotalOperationCosts = mockBuilding1.Operations.reduce((acc, operation) => acc + operation.cost, 0); + const expectedTotalOperationCosts = mockBuilding1.Operations === undefined ? 0 : mockBuilding1.Operations?.reduce((acc, operation) => acc + operation.Cost, 0); expect(totalOperationCosts).toEqual(expectedTotalOperationCosts); });