Unit and End to End Testing in AngularJS