AngularJS Testing Cookbook

Simon Bailey

  • 出版商: Packt Publishing
  • 出版日期: 2015-04-04
  • 售價: $1,270
  • 貴賓價: 9.5$1,207
  • 語言: 英文
  • 頁數: 193
  • 裝訂: Paperback
  • ISBN: 1783983744
  • ISBN-13: 9781783983742
  • 相關分類: Angular
  • 下單後立即進貨 (約3~4週)

商品描述

Eliminate volatile code by taking control and understanding how to test AngularJS applications

About This Book

  • Learn how to build a solid and more reliable AngularJS codebase through test-driven development using clearly defined recipes
  • Understand how to set up and configure your development environment for unit and end-to-end testing of AngularJS applications
  • Over 50 hands-on recipes to help you build a solid foundation in AngularJS

Who This Book Is For

This book is intended for developers who have an understanding of the basic principles behind both AngularJS and test-driven development. You, as a developer, are interested in eliminating the fear related to either introducing tests to an existing codebase or starting out testing on a fresh AngularJS application. If you're a team leader or part of a QA team with the responsibility of ensuring full test coverage of an application, then this book is ideal for you to comprehend the full testing scope required by your developers. Whether you're new to or are well versed with AngularJS, this book will guarantee a complete understanding of your application code and help reduce the cost of bugs.

What You Will Learn

  • Install and configure all required tools and dependencies to begin testing your AngularJS application
  • Understand the anatomy of a unit test and integrate core fundamentals to begin testing AngularJS
  • Discover navigation and routing using both the AngularJS router and the ui-router library
  • Explore how to test controllers
  • Analyze test directives and user-based interaction
  • Explain the uses of spies and test events
  • Test services using mocks and spies
  • Animate test cases, both synchronously and asynchronously

In Detail

AngularJS stepped up to offer a comprehensive solution to frontend development with minimal dependencies and a clear set of objectives.

This book follows the AngularJS philosophy and offers guidance on how to approach testing components that make up the AngularJS framework. At the start of the book, you will explore how to configure your system to run unit and end-to-end tests. Following this, you'll become familiar with fundamental principles on testing AngularJS with Jasmine. Then, you'll understand how spies can enable you to test your code with greater coverage and simplicity throughout your application. The final result is an AngularJS application that is tested with integrity, helping facilitate a cleaner and more reliable codebase.