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/16/2015

You Got Karma in My Require, You Got Require in My Karma, No Worries We Have Define

Karma is a pretty powerful test runner for JavaScript. Most of our code is in Angular, so we load our Karma test context with every file in our project. This should be easy...except...we do have a few libraries that only load on demand. This is no problem for the Karma context since the file is loaded along with everything else. The problem is that we use require to load it.

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.