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.

12/24/2014

An Angular-ized Require-Based Script Loader

The co-author for this approach, who did a lot of the heavy lifting, is the very talented Nate Ferrero.

We recently found another speed bump as we carefully drove down our path to removing require.js in favor of Angular purity. We found hidden dependencies nestled into the code. Code development of any substantial kind that lives for any substantial amount of time with multiple developers quickly gains warts.