Skip to content

Commit a96af36

Browse files
[DSC-2808] fix possible error in tests caused by google map api
1 parent e329304 commit a96af36

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/app/statistics-page/cris-statistics-page/statistics-map/statistics-map.component.spec.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
import { NO_ERRORS_SCHEMA } from '@angular/core';
12
import {
23
ComponentFixture,
34
TestBed,
45
} from '@angular/core/testing';
56
import { By } from '@angular/platform-browser';
67
import { TranslateModule } from '@ngx-translate/core';
7-
import { GoogleChartInterface } from 'ng2-google-charts';
8+
import {
9+
GoogleChartInterface,
10+
Ng2GoogleChartsModule,
11+
} from 'ng2-google-charts';
812

913
import { ExportService } from '../../../core/export-service/export.service';
1014
import { UsageReport } from '../../../core/statistics/models/usage-report.model';
@@ -71,7 +75,11 @@ describe('StatisticsMapComponent', () => {
7175
providers: [
7276
{ provide: UsageReportDataService, useValue: usageReportServiceStub },
7377
],
78+
schemas: [NO_ERRORS_SCHEMA],
7479
})
80+
.overrideComponent(StatisticsMapComponent, {
81+
remove: { imports: [Ng2GoogleChartsModule] },
82+
})
7583
.compileComponents();
7684
});
7785

0 commit comments

Comments
 (0)