在Angular 2中进行测试时,何时在TestBed中使用异步函数?
你什么时候用的?
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [MyModule],
schemas: [NO_ERRORS_SCHEMA],
});
});
Run Code Online (Sandbox Code Playgroud)
你何时使用它?
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [MyModule],
schemas: [NO_ERRORS_SCHEMA],
});
}));
Run Code Online (Sandbox Code Playgroud)
任何人都可以启发我吗?
unit-testing karma-jasmine angular2-testing angular angular-test