JQuery testing can be easy. Raphael too. Check out recorderMock.js · HackerTrans