O'Reilly logo

Angular Test-Driven Development - Second Edition by Md. Ziaul Haq

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Testing routers and navigation

We were introduced to Angular routers and navigation alongside the general components in Chapter 7, Flip Flop.

As we have discussed the different types of tests for Angular components, routers and navigation, we will look at integration testing. For that, we will use our application component test, that is, our base component, and we will then integrate navigation and router-outlet component tests with the application component to test the router.

Testing the app component

Before we go ahead with router testing, we will get ready with our application component tests. In the app component test, we will test whether the component is defined and initiated correctly, and then we will test the page title by selecting the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required