如果要创建它们,你就要配置TestBed。
环境设置 要开始测试那些通过HttpClient发起的请求,就要导入HttpClientTestingModule模块,并把它加到你的TestBed设置里去,代码如下: app/testing/http-client.spec.ts
app/core/phone/phone.service.spec.ts content_copyimport{inject,TestBed}from'@angular/core/testing';import