1 import { TestBed } from '@angular/core/testing';
3 import { DashboardReportService } from './dashboard-report.service';
4 import { HttpClientTestingModule } from '@angular/common/http/testing';
5 import { HttpClient } from '@angular/common/http';
6 import { environment } from 'src/environments/environment';
8 describe('DashboardReportService', () => {
10 let service: DashboardReportService;
12 beforeEach(() => {TestBed.configureTestingModule({
13 imports: [HttpClientTestingModule],
14 providers: [HttpClient, HttpClientTestingModule, DashboardReportService]
16 service = TestBed.get(DashboardReportService);
20 it('should be created', () => {
21 const service: DashboardReportService = TestBed.get(DashboardReportService);
22 expect(service).toBeTruthy();
25 it('should getReportData', () => {
26 service.getReportData("test").subscribe((res) => {
27 expect(res).toBe(environment);
31 it('should getReportDataWithFormFields', () => {
32 service.getReportDataWithFormFields("just", "test").subscribe((res) => {
33 expect(res).toBe(environment);