Before you jump into the intricacies of testing an Angular 2 application, it's important to first examine the supporting infrastructure that will make running these tests possible. The bulk of official Angular resources offer tests on top of Karma and Jasmine, and there's no reason to rock the boat on this one, as these are both fine testing tools. That said, it's a whole new world with TypeScript involved, and using them in tests will require some considerations.
This recipe will demonstrate how to put together a very simple unit test suite. It will use Karma and Jasmine as the test infrastructure, TypeScript and Webpack for compilation and module support, and PhantomJS as the test browser. For those unfamiliar with these tools, here's a bit about them:
Karma is a unit test runner. You run tests through Karma on the command line. It has the ability to start up a test server that understands how to find test files...