Implement the best practices to improve your AngularJS applications using test-driven development
Building on the initial foundational aspects, you will expand to include testing for multiple controllers, partial views, location references, CSS, and the HTML element. In addition, you will explore using a headless browser with Karma. You will also configure Karma file watching to automate testing and tackle components of AngularJS (controller, service, model, and broadcasting) using TDD. At the end of this book, you will extend explore how to pull data using an external API, setting up and configuring Protractor to use a standalone Selenium server, and setting up Travis CI and Karma to test your application.
This book is a complete guide to testing techniques using Karma for unit testing and performing end-to-end testing with Protractor.
What You Will Learn
Implement unit and end-to-end testing with Karma and Protractor
Understand the workings of the file auto-watch feature and headless browser testing with Karma
Develop AngularJS controllers, services, and other components using the TDD approach
Implement the testing techniques with mocks, broadcast events, and asynchronous behavior
Integrate REST-based services and APIs into an application to extract data
Automate Karma unit tests with Travis CI
Get to know about TDD techniques, the TDD life cycle, and its power through clear examples to enhance your AngularJS applications
Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.