July 2018
Intermediate to advanced
420 pages
8h 46m
English
We've come a long way, and now, all of the tests are passing. So, it is time to create some new tests.
The following lines are very simple, and we have already followed this path in previous examples, so, if something new comes up, we will mention it at the end of the code block.
Let's create some unit tests in our application, as follows:
it('should create router-outlet', async(() => { const compiled = fixture.debugElement.nativeElement; expect(compiled.querySelector('router-outlet')).toBeDefined(); }));
The preceding code will check the router-outlet tag inside of app.component.spec.ts.
Read now
Unlock full access