I am using Angular 6 and I have one concern regarding every test which I have seen so far.
Here's a simple test of simple component which is generated by cli.
describe('CompComponent', () => {
let component: CompComponent;
let fixture: ComponentFixture<CompComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CompComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CompComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
How do I know for certain that each Async beforeEach
call is done before each test unit?
Are there any cases where this call will happen after each because test is an async call after all?