1 import { TestBed } from '@angular/core/testing';
3 import { RunService } from './run.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('RunService', () => {
9 let service: RunService;
13 TestBed.configureTestingModule({
14 imports: [HttpClientTestingModule],
15 providers: [HttpClient, HttpClientTestingModule, RunService]
18 service = TestBed.get(RunService);
21 it('should be created', () => {
22 const service: RunService = TestBed.get(RunService);
23 expect(service).toBeTruthy();
26 it('should getReportData', () => {
27 service.getReportData("test").subscribe((res) => {
28 expect(res).toBe(environment);
32 it('should getReportDataWithFormFields', () => {
33 service.getReportDataWithFormFields("just", "testing").subscribe((res) => {
34 expect(res).toBe(environment);
38 it('should getDefinitionPageDetails', () => {
39 service.getDefinitionPageDetails(1).subscribe((res) => {
40 expect(res).toBe(environment);
44 it('should refreshFormFields', () => {
45 service.refreshFormFields("just", "testing").subscribe((res) => {
46 expect(res).toBe(environment);
50 it('should getFormFieldGroupsData', () => {
51 service.getFormFieldGroupsData("test").subscribe((res) => {
52 expect(res).toBe(environment);
56 it('should downloadReportExcel', () => {
57 service.downloadReportExcel("test").subscribe((res) => {
58 expect(res).toBe(new Blob);