Found in 2 comments on Hacker News
augustl · 2010-07-03 · Original thread
Use JsTestDriver to write and run your tests.

One of my pet projects is open source and tested with JsTestDriver [1], that should be a good starting point for learning more about how to test JavaScript in webapps.

I also like to use Sinon [2] for stubbing and mocking. The author of Sinon is also putting the finishing touches on a book about TDD-ing JavaScript.

EDIT: calendar-logic.js [4] an example of how you can extract and test logic in separate libraries. It's being used on figureoutwhen.com.

[1] http://github.com/augustl/figureoutwhen.com [2] http://cjohansen.no/sinon/ [3] http://www.amazon.com/Test-Driven-JavaScript-Development-Dev... [4] http://ditrw.com/calendar-logic-dot-js/

augustl · 2010-06-26 · Original thread
Test Driven JavaScript Development by Christian Johansen.

http://www.amazon.com/Test-Driven-JavaScript-Development-Dev...

Not out yet, though.

Fresh book recommendations delivered straight to your inbox every Thursday.