December 2017
Beginner
372 pages
10h 32m
English
Now, we have created our module and added the component and its dependencies. The next step is to create the component and get an instance of it. For this, we write a second beforeEach function, as shown in the following code:
beforeEach(() => {fixture = TestBed.createComponent(HomepageComponent);component = fixture.componentInstance;fixture.detectChanges();});
Here, we see that we are doing three things:
Read now
Unlock full access