Book Image

Angular 2 Cookbook

By : Patrick Gillespie, Matthew Frisbie
Book Image

Angular 2 Cookbook

By: Patrick Gillespie, Matthew Frisbie

Overview of this book

Angular 2 introduces an entirely new way to build applications. It wholly embraces all the newest concepts that are built into the next generation of browsers, and it cuts away all the fat and bloat from Angular 1. This book plunges directly into the heart of all the most important Angular 2 concepts for you to conquer. In addition to covering all the Angular 2 fundamentals, such as components, forms, and services, it demonstrates how the framework embraces a range of new web technologies such as ES6 and TypeScript syntax, Promises, Observables, and Web Workers, among many others. This book covers all the most complicated Angular concepts and at the same time introduces the best practices with which to wield these powerful tools. It also covers in detail all the concepts you'll need to get you building applications faster. Oft-neglected topics such as testing and performance optimization are widely covered as well. A developer that reads through all the content in this book will have a broad and deep understanding of all the major topics in the Angular 2 universe.
Table of Contents (18 chapters)
Angular 2 Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Dedication
Preface

Introduction


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.