I\'m creating a js widget and first part is to add script width javascript, something like this (example from google analytics):
(function() { var ga = d
For heavy DOM testing with Jasmine you can use Jasmine Headless WebKit.