Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Angular for Enterprise Applications

You're reading from   Angular for Enterprise Applications Build scalable Angular apps using the minimalist Router-first architecture

Arrow left icon
Product type Paperback
Published in Jan 2024
Publisher Packt
ISBN-13 9781805127123
Length 592 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Doguhan Uluca Doguhan Uluca
Author Profile Icon Doguhan Uluca
Doguhan Uluca
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Angular’s Architecture and Concepts FREE CHAPTER 2. Forms, Observables, Signals, and Subjects 3. Architecting an Enterprise App 4. Creating a Router-First Line-of-Business App 5. Designing Authentication and Authorization 6. Implementing Role-Based Navigation 7. Working with REST and GraphQL APIs 8. Recipes – Reusability, Forms, and Caching 9. Recipes – Master/Detail, Data Tables, and NgRx 10. Releasing to Production with CI/CD 11. Other Books You May Enjoy
12. Index
Appendix A

Code coverage reports

A code coverage report is a good way to understand the amount and trends of unit test coverage for your Angular project.

To generate the report for your app, execute the following command from your project folder:

$ npx ng test --watch=false --code-coverage

The resulting report will be created as an HTML file under a folder named coverage; execute the following command to view it in your browser:

$ npx http-server -c-1 -o -p 9875 ./coverage

You may need to specify --project for the ng test command. Similarly, the coverage report may be generated in a sub-folder under coverage. You can select the folder to view it.

Here’s the folder-level sample coverage report generated by istanbul for LemonMart:

A screenshot of a spreadsheet  Description automatically generated

Figure 10.20: Istanbul code coverage report for LemonMart

You can drill down on a particular folder, such as src/app/auth, and get a file-level report, as shown here:

A screenshot of a data  Description automatically generated

Figure 10.21: Istanbul code coverage...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime