Unit Testing in Angular 12
Automated tests are an important ingredient in a successful project. This course will teach you everything you need to know to unit test your Angular projects, including testing services, component templates, and dealing with asynchronous code.
What you'll learn
Angular gives us an amazing set of tools to help us unit test our code, but all those tools and techniques need to be learned. In this course, Unit Testing in Angular 12, you will learn how to effectively unit test your Angular code. First, you will learn to write isolated tests to quickly and easily test services, pipes, and components. Next, you will explore integration tests, used to test your components with their templates. Then, you will see how to deal with advanced topics like asynchronous code. Finally, and most importantly, you will know what it means to write effective, maintainable unit tests. When you are finished with this course, you will feel confident in your ability to write good unit tests for your Angular projects.
Table of contents
- Introduction 1m
- Debugging Techniques with Angular and Karma 1m
- The TestBed 9m
- Using NO_ERRORS_SCHEMA 2m
- Testing Rendered HTML 5m
- NativeElement vs. DebugElement 6m
- More Complex Shallow Integration Tests 3m
- Mocking an Injected Service 8m
- Mocking Child Components 4m
- Dealing with Lists of Elements 3m
- Summary 1m