Client Side Unit Testing for Single Page Applications 4.59 http://spkr8.com/t/15051

Description:

The unit testing web developer population, in general, has been growing by leaps and bounds, but sadly those gains haven’t been as steady on the client side. I’d like to address a few of the reasons why that is, and how we can change that by unit testing our client side application code as thoroughly as possible.

Most unit testing examples focus on very straightforward imperative tests. I have seen many explanations of JavaScript unit testing that describe how to verify the logic behind a calculator or a form validation library, but not how to test a more complex, event triggered application. I’ll walk you through a simple unit tested Backbone application and explain some design tips for effectively unit testing your code along the way. After that, I will explain how to effectively mock Ajax requests and trigger Ajax events from your unit tests.

I will also be giving a short introduction to the grunt build tool. I’ll show you how to setup grunt in such a way that your test output can be easily integrated with your continuous integration suite as well as run every time you change a file. Hopefully, eventually, we’ll all be able to have the confidence inspired by the green and red lights on a build monitor, on both sides of the great HTTP divide.

Comments on this Talk

Have an account? Sign in or register.

Leave a Comment

4 Ratings: 4.59

Delivery: 4.65

Content: 4.53

Time & Location

August 20, 2012 — 07:00 PM
NYC, NY (Map It)