Configuring and running your test environment in Yeoman and Grunt
The Yeoman project is an extremely popular scaffolding tool that allows the quick startup and growth of an AngularJS codebase. Bundled in it is Grunt, which is the JavaScript task runner that you will use in order to automate your application's environment, including running and managing your test utilities. Yeoman will provide much of your project structure for you out of the box, including but not limited to the npm and Bower dependencies and also the Gruntfile, which is the file used for the definition of the Grunt automation.
How to do it…
There is some disagreement over the taxonomy of test types, but with AngularJS, the tests will fall into two types: unit tests and end-to-end tests. Unit tests are the black-box-style tests where a piece of the application is isolated, has external components mocked out for simulation, is fed controlled input, and has its functionality/output verified. End-to-end tests simulate...