Book Image

AngularJS Testing Cookbook

By : Simon Bailey
Book Image

AngularJS Testing Cookbook

By: Simon Bailey

Overview of this book

<p>AngularJS stepped up to offer a comprehensive solution to frontend development with minimal dependencies and a clear set of objectives.</p> <p>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.</p>
Table of Contents (16 chapters)
AngularJS Testing Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


JavaScript, CSS3 transitions, and key frame animations offer a wealth of creative visual effects, for example when transitioning between two states. AngularJS offers hooks into these using the ngAnimate module. There are a range of directives that support animations, out of the box, and a full list can be found at https://docs.angularjs.org/api/ngAnimate. If you're looking for animation detection support while performing DOM operations in custom directives, then look no further than the $animation service (https://docs.angularjs.org/api/ngAnimate/service/$animate).

For information on animations, I highly recommend that you read this great article at http://www.yearofmoo.com/2013/08/remastered-animation-in-angularjs-1-2.html#testing-animations. This chapter will briefly introduce you to unit testing JavaScript animations, first using a synchronous approach and then asynchronously. The AngularJS team provides the animation mock module to help test animations (https://github.com...