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.