Showing posts with label AngularJs. Show all posts
Showing posts with label AngularJs. Show all posts

1/29/2015

Using ngTestHarness to simplify $httpBackend testing

$httpBackend is one of the greatest things that AngularJs provides. $httpBackend intercepts AJAX requests made by Angular's $http service to allow for full unit testing. The ngTestHarness helps simplify interactions with the mock backend by abstracting away WHEN and EXPECT differences.

1/12/2015

ngTestHarness: Strap in with this new testing helper for Angular.js

This is the first time I can point to open source code that I took a large part in authoring. I am proud of the project that the very talented Team Titan at Gaikai, a Sony Entertainment Company, has created. While updating/adding unit tests for development and build purposes we became very disenchanted with the complexity required for creating unit tests in Angular.

11/11/2014

Angular: Creating attributes in HTML Elements

Angular gives the HTML page a lot more power to build its own destiny. We can embed view only concerns directly into the HTML. This helps separate the business logic from the the display logic. Of course this has positive and negative implications. One positive I found this week was the ability to create HTML Element attributes dynamically with no JavaScript.

9/26/2014

Building an Angular List: Using ng-repeat

There are many things about Angular that make it an excellent framework to use, and one of my favorites is the way it's data binding simplifies the implementation of UI elements. One of the most useful elements, in my opinion, is the ng-repeat. Ng-repeat makes creating lists so simple that you will want to use them all the time.

6/04/2014

Angular and Jasmine: Injecting into the test environment

UPDATE: The team at Gaikai, where I work, has released an open source testing framework for Angular which streamlines this process and greatly simplifies the testing process. I wrote about it here: http://randomjavascript.blogspot.com/2015/01/ngtestharness-strap-in-with-this-new.html

I have set my sights on improving my Angular proficiency, however I am not ready to give up on all my other tools. I have a strong preference for Jasmine, and the recent release of 2.0 further cemented that comfort zone. Jasmine 2.0 made major improvements by removing window dependency and improving async support. Using Jasmine and Jasmine-Node together allows me to write tests in the same language for both server and client. I prefer to standardize as much as possible on a project, and having one language for tests on both application tiers is valuable to me in time and effort saved.