July 2017
Intermediate to advanced
454 pages
10h 1m
English
TestBed is the most important testing utility provided by Angular. It creates an Angular testing module--an @NgModule class, which we can use for our testing purposes.
Since it creates an @NgModule, we can define providers, imports, and exports--similar to our regular @NgModule configuration.
We can configure TestBed in either async or sync mode.
Now, let's take a look at the code snippet as follows:
beforeEach(() => { fixture = TestBed.createComponent(AppComponent); comp = fixture.componentInstance ...
Read now
Unlock full access