In this lecture, we are going to address a hidden issue with our test.
It may not seem like it, but there is an error being thrown by our test.
Karma is not picking up on it.
The error can be viewed by opening the developer tools in the console panel.
A few errors will be thrown by our components.
According to the errors, the component relies on routing to be functional.
We're using router directives for our links.
Without the routing module, our component will throw errors.
Fixing this is simple.
The Angular team has a variation of the routing module for testing.
We can import this module for supporting basic routing features in our tests.
It's simpler than using the regular routing module in your editor.
Open the navigation test file.
At the top of the file import the router testing module object from the angular slash router slash testing
package.
Next scroll to the testing module's configuration object.
In this object, add the imports array.
Lastly, add the router testing module.
Object to the array.
After making those adjustments, the error should go away.
Head on over to the browser.
The console should have been cleared.
If not, you can refresh the page to view a fresh console.
This time around, the errors related to the routing features have disappeared.
If your component relies on angular routing package, you can use this module over the regular module.
It requires less configuration without sacrificing the original features of the package.
Our component is finally working.
We can start writing a test for testing the logout link in the next lecture.
Let's begin writing another test.