I'm not sure how well this will work for me since it's based on Java, but Ian Bourke offers a suggestion on how to Unit Test in Javascript.  I'll try it when I have the opportunity.