Read Programming as Theory Building

JavaScript testing: How to structure your unit tests?

Advanced Sinon.js tips: How to stub/mock complex objects, such as DOM objects