Router Testing
Author: Thomas Laforge
Information
Testing is a crucial step in building scalable, maintainable, and trustworthy applications. Testing should never be avoided, even in the face of short deadlines or strong pressure from the product team. Nowadays, there are numerous awesome tools available that make it easy to test your code and provide a great developer experience.
In this series of testing exercises, we will learn and master Testing Library that simplifies DOM manipulation for testing any Angular component.
Statement:
We have a functional application that lists available books for searching. If the search is valid, you will be directed to one or more books, otherwise, you will end up on an error page.
The goal is to test this behavior.
A file named app.component.spec.ts
Submitting your work
- Fork the project
- clone it
- npm install
npx nx serve router-testingto play with the applicationnpx nx test router-testingto test your application- ...work on it
- Commit your work
- Submit a PR with a title beginning with Answer:17 that I will review and other dev can review.