以前也有类似的问题,但是在我全部阅读完之后,仍然不知道如何解决问题。
我正在为Angular项目运行以下棉绒
ng lint && ng test && ng build --configuration=local
但是得到了结果
[10, 5]: Promises must be handled appropriately
这意味着“ TestBed.configureTestingModule”行
以下是原始代码(仅公共部分)
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import {CommonComponent} from './loading-common.component';
describe('LoadingComponent', () => {
let component: CommonComponent;
let fixture: ComponentFixture<CommonComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CommonComponent ],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CommonComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
是否有针对此问题的其他解决方案?谢谢。
其他信息: 这没有提及描述: What could this be about? [TsLint Error: "Promises must be handled appropriately"]