This chapter will cover the following recipes:
Writing tests is like brushing your teeth. You can get away with skipping it for a while, but it'll catch up with you eventually.
The world of testing is awash with conflicting ideologies, platitudes, and grandstanding. What's more, there is a dizzying array of tools available that allow you to write and run your tests in different ways, automate your tests, or analyze your test coverage or correctness. On top of that, each developer's utility and style of testing is unique; someone hacking away at a pre-seed startup will not have the same requirements as a developer that is part of a large team inside a Fortune 500 company.
The goal of this chapter is to walk you through the available testing utilities that the Angular 2 framework comes with out of the box, as well as some strategies for deploying these utilities. The recipes will focus on unit tests rather than E2E tests, as an overwhelming majority of robust test suites will be unit tests.