Discover how to test and debug the code in your Angular applications. Learn how to analyze testing reports, prevent common errors with custom error handling, and more.
Overview
Syllabus
Introduction
- Angular: Testing and debugging
- What you should know
- Exercise files
- Application overview
- Installing project dependencies
- Installing Angular CLI
- Error handling in Angular
- Understanding zones in Angular apps
- Add a new file using Angular CLI
- Writing a custom error handler class
- Changes for Angular v16
- Adding a local storage service
- Fixing dependency injection errors
- Getting and setting data in local storage
- Adding a custom Angular pipe
- Using regular expressions to find content
- Using a pipe to change HTML content
- Common pipe errors
- Understanding Angular decorators
- Challenge: Filter the array of users by locationId
- Solution: Filter the array of users by locationId
- Getting data using REST requests
- Updating data using REST requests
- Working with observables
- Catching errors from an observable
- Testing overview
- Basic Karma configuration
- Testing services
- Fixing injection dependency errors
- Testing pipes
- Testing components
- Challenge: Custom test bed wrapper
- Solution: Custom test bed wrapper
- Basic Protractor configuration
- End-to-end testing without page objects
- End-to-end testing with page objects
- Changes for Angular v12
- Challenge: Testing filter input
- Solution: Testing filter input
- Installing and running ESLint
- Basic ESLint configuration
- Fixing lint errors
- Installing EditorConfig
- Basic EditorConfig configuration
- Next steps
Taught by
Derek Peruo