Play by Play: Angular Testing with John Papa and Ward Bell
Angular testing isn't the most exciting or attractive part about coding. It's important, of course, but it can be kind of hard to get started. You know you should, you kinda feel guilty that you don't, but there's something holding you back. This course should help you get over the hump and start writing Angular tests. If you're brand new to testing Angular code, if you're unsure how to get started, or if you're like John Papa and absolutely hate it, this course is for you. By the end of this course, you'll know some tools and best practices to help you start writing Angular tests.
What you'll learn
Angular testing isn't the most exciting or attractive part about coding. It's important, of course, but it can be kind of hard to get started. You know you should, you kinda feel guilty that you don't, but there's something holding you back. This course should help you get over the hump and start writing Angular tests. If you're brand new to testing Angular code, if you're unsure how to get started, or if you're like John Papa and absolutely hate it, this course is for you. By the end of this course, you'll know some tools and best practices to help you start writing Angular tests.
Table of contents
- Introduction 2m
- Instant Angular App with HotTowel 1m
- Adding New Views and Controllers 5m
- Running the Demo and Automatic Wireup of the Files 1m
- Adding Data 4m
- Showing Data on the View 5m
- Failing a Test 3m
- Running Tests in the Browser 1m
- Running Suites of Tests 5m
- Test Setup with Describe and BeforeEach 2m
- Making Testing Easier with Bard 3m
- Creating a Controller in a Test 1m
- How to Think About What Tests We Want to Write 3m
- Testing if Data Exists 3m
- Testing if the Data Is the Expected Shape 6m
- Faking the Data Service Dependency 3m
- Reducing Testing Code 3m
- Reducing Friction for Injections 5m
- What Module Do I Test? 9m
- Testing Angular Services 6m
- Flushing Promises in Tests 6m
- Faking $http Calls 5m
- Exercising the $http Call for Different Status Codes 3m
- Testing Failure Paths 5m
- Debugging Tests in the Browser 1m
- Timeouts in Tests 2m
- Making Real HTTP Calls Takes an Async Test 7m
- Master - Details 6m
- Testing a State Change in Master - Details 2m
- Faking (or restoring) the $stateProvider 4m
- Flushing State Changes and Testing Bad States 1m
- Keeping Tests Simple 2m
- Coverage 1m
- Conclusion 0m