Angular服务测试

import { TestBed } from ‘@angular/core/testing’;
import { DesignService, PBoxTitle } from ‘./design.service’;
import { HttpToolsService, ResultData } from ‘…/public/services/http-tools.service’;
import { HttpClientTestingModule, HttpTestingController } from ‘@angular/common/http/testing’;
import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from ‘@angular/core’;
import { MaterialModule } from ‘…/material-module’;
import { RouterTestingModule } from ‘@angular/router/testing’;
import { HttpErrorResponse, HttpClient } from ‘@angular/common/http’;
import { defer } from ‘rxjs’;
import { Data } from ‘@angular/router’;
import { environment } from ‘src/environments/environment.prod’;
import { BrowserAnimationsModule } from ‘@angular/platform-browser/animations’;

describe(‘DesignService’, () => {

let httpClient: HttpClient;
let httpTestingController: HttpTestingController;
let service: DesignService;
let testId = ‘45ca7e

你可能感兴趣的:(JavaScript)