The JS library Scriptaculous is mainly know for its amazing effects and controls (e.g. AutoComplete, Drag&Drop, Sliders). However there is another side of it which is not as obvious. It contains a complete JS UnitTest framework which makes testing Javascript extremely easy and convenient.
Thomas Fuchs (creator of Scriptaculous) posted a presentation he gave about this subject which contains the basic things one needs to know to get started. Along with the unit tests coming with scriptaculous itself gave me everything I needed to write my own first Javascript test-case.